Index: trunk/kernel/include/usersession.php =================================================================== diff -u -r472 -r510 --- trunk/kernel/include/usersession.php (.../usersession.php) (revision 472) +++ trunk/kernel/include/usersession.php (.../usersession.php) (revision 510) @@ -371,15 +371,15 @@ $rootpass = $objConfig->Get("RootPass"); if($rootpass!=$userPassword) { - return FALSE; + return false; } else { if(!strlen($this->GetSessionKey())) $this->GetNewSession(); $this->Set("PortalUserId",-1); $this->Update(); - return TRUE; + return true; } } else @@ -400,8 +400,8 @@ $this->m_Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"Login"); return false; } - if($result->EOF) - return false; + + if($result->EOF) return -1; // no any user with username & pass specified } if(!strlen($this->GetSessionKey())) { @@ -460,11 +460,11 @@ if( ! $this->HasSystemPermission('LOGIN') ) { $this->Logout(); - return false; + return -2; // no perm login } } - return true; + return true; // login ok } function Logout()