DataObjects/Images.php
[Pman.Core] / DataObjects / Core_person.php
index a12e4df..2556a2f 100644 (file)
@@ -254,7 +254,6 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
     //   ---------------- authentication / passwords and keys stuff  ----------------
     function isAuth()
     {
-        
         @session_start();
        
         $ff= HTML_FlexyFramework::get();
@@ -299,7 +298,7 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
             return false;
         }
         
-        print_r('local auth');exit;
+        
         // local auth - 
         $default_admin = false;
         if (!empty($ff->Pman['local_autoauth']) && 
@@ -649,8 +648,11 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
             $im->selectAdd();
             $im->selectAs($im,  'company_id_logo_id_%s');
             if ($im->find(true)) {
-                    
+                
                 foreach($im->toArray() as $k=>$v) {
+                    if (!preg_match('/^company_id_logo_id_/', $k)) {
+                        continue;
+                    }
                     $aur[$k] = $v;
                 }
             }
@@ -1178,8 +1180,9 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
         if ($roo->authUser->id > -1 ||  $p->count() > 1) {
             return;
         }
-        $c = DB_DAtaObject::Factory('core_company');
-        $tc =$c->count();
+        $c = DB_DataObject::Factory('core_company');
+        $tc = $c->count();
+        
         if (!$tc || $tc> 1) {
             $roo->jerr("can not create initial user as multiple companies already exist");
         }