CC-3693: Uninstalling + Reinstall of Airtime + refreshing the page as a non-existant user causes a stack trace.
-Fixed
This commit is contained in:
parent
7d6e251adf
commit
5aa2339a1d
|
@ -295,11 +295,18 @@ class Application_Model_User {
|
|||
|
||||
public static function GetCurrentUser() {
|
||||
$userinfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
|
||||
|
||||
if (is_null($userinfo)){
|
||||
return null;
|
||||
} else {
|
||||
return new self($userinfo->id);
|
||||
try {
|
||||
return new self($userinfo->id);
|
||||
} catch (Exception $e){
|
||||
//we get here if $userinfo->id is defined, but doesn't exist
|
||||
//in the database anymore.
|
||||
Zend_Auth::getInstance()->clearIdentity();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue