mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 16:32:20 +00:00
Fixed Errorhandling when switching between Users to display correct Errormessages
This commit is contained in:
@@ -55,14 +55,7 @@ class Login extends FHC_Controller
|
||||
$this->load->library('AuthLib');
|
||||
|
||||
$loginAS = $this->authlib->loginASByUID($uid);
|
||||
if (isSuccess($loginAS))
|
||||
{
|
||||
$this->outputJsonSuccess(true); // obtained!
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->outputJsonSuccess(getCode($loginAS)); // returns the error code
|
||||
}
|
||||
$this->outputJson($loginAS); // returns the error code
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,6 +80,10 @@ class AuthLib
|
||||
setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, getData($loginAS));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$loginAS = error('It is not allowed to switch to this user', AUTH_NOT_AUTHENTICATED); // not authenticated by default
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user