Commits

Jason Green committed 9be3fff

Fixing issue with remember me and relogging in when remembered

  • Participants
  • Parent commits c0e7d6c

Comments (0)

Files changed (1)

File app/protected/modules/zurmo/components/WebUser.php

 
         protected function afterLogin($fromCookie)
         {
-            AuditEvent::logAuditEvent('UsersModule', UsersModule::AUDIT_EVENT_USER_LOGGED_IN);
-            if ($this->hasEventHandler('onAfterLogin'))
+            //Only run afterLogin when not coming from a cookie otherwise Yii::app()->user is not available.
+            if(!$fromCookie)
             {
-                $this->onAfterLogin(new CEvent($this));
+                AuditEvent::logAuditEvent('UsersModule', UsersModule::AUDIT_EVENT_USER_LOGGED_IN);
+                if ($this->hasEventHandler('onAfterLogin'))
+                {
+                    $this->onAfterLogin(new CEvent($this));
+                }
             }
+
         }
 
         /**