DataObjects/Person.php
authorAlan Knowles <alan@roojs.com>
Sat, 8 Oct 2011 01:54:12 +0000 (09:54 +0800)
committerAlan Knowles <alan@roojs.com>
Sat, 8 Oct 2011 01:54:12 +0000 (09:54 +0800)
DataObjects/Person.php

index 7d9200c..e49b222 100644 (file)
@@ -48,12 +48,20 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
             $content->$k = $v;
         }
         
+        $ff = HTML_FlexyFramework::get();
+        
+        
         //?? is this really the place for this???
-        if (empty($args['no_auth']) && !in_array($templateFile, array(
-           // templates that can be sent without authentication.
-            'password_reset' ,
-            'password_welcome'
-            ))) {
+        if (
+                !$ff->cli && 
+                empty($args['no_auth']) &&
+                !in_array($templateFile, array(
+                    // templates that can be sent without authentication.
+                     'password_reset' ,
+                     'password_welcome'
+                 ))
+            ) {
+            
             $content->authUser = $this->getAuthUser();
             if (!$content->authUser) {
                 return PEAR::raiseError("Not authenticated");