From 982fad0e2180f96674ec36d522ff0c3eeaa122b9 Mon Sep 17 00:00:00 2001
From: Vincent Massaro <vincent.massaro@yale.edu>
Date: Mon, 1 Jul 2013 12:56:11 -0400
Subject: [PATCH] allow drush to bypass password protection

---
 protected_node.module | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/protected_node.module b/protected_node.module
index 4469ac8..a1dedce 100644
--- a/protected_node.module
+++ b/protected_node.module
@@ -160,6 +160,11 @@ function protected_node_access_callback() {
 function protected_node_init() {
   global $user;
 
+  // Let Drush bypass password protection.
+  if (function_exists('drush_main')) {
+    return;
+  }
+
   // Are we about to display a node?
   // Can user see all nodes anyway?
   if (user_access('bypass password protection')) {
-- 
1.8.1.4

