Cleanup, added docs & RC 2
This commit is contained in:
@ -18,6 +18,12 @@ use Inforbank\Application;
|
||||
|
||||
class Authorization
|
||||
{
|
||||
/**
|
||||
* Login user
|
||||
* @param $rekeningnr
|
||||
* @param $passcode
|
||||
* @return boolean
|
||||
*/
|
||||
public function login($rekeningnr, $passcode)
|
||||
{
|
||||
$container = Application::getContainer();
|
||||
@ -42,16 +48,27 @@ class Authorization
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return current user id
|
||||
* @return any
|
||||
*/
|
||||
public function getUserID()
|
||||
{
|
||||
return $_SESSION['userid'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return if the current user is authenticated
|
||||
* @return boolean
|
||||
*/
|
||||
public function isUserAuthenticated()
|
||||
{
|
||||
return $this->getUserID() !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user session data
|
||||
*/
|
||||
public function logout()
|
||||
{
|
||||
unset($_SESSION['userid']);
|
||||
|
Reference in New Issue
Block a user