1
0

Cleanup, added docs & RC 2

This commit is contained in:
2017-04-04 08:26:11 +02:00
parent 21e67b0298
commit 3ee95398c4
18 changed files with 145 additions and 63 deletions

View File

@ -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']);