\Login

Handles user logins.

Summary

Methods
Properties
Constants
__construct()
__destruct()
handleRequests()
isLoggedIn()
generateNonce()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
loginAuthCode()
loginPassword()
login()
logout()
$logoutSecs
N/A

Properties

$logoutSecs

$logoutSecs : int

Holds the time in seconds until a user is logged out (when being inactive).

Type

normal

Methods

__construct()

__construct() : mixed

Starts a new session or continues the current session.

Returns

mixed

__destruct()

__destruct() : mixed

Ends the current session.

Returns

mixed

handleRequests()

handleRequests() : void

Handles incoming GET and POST requests.

isLoggedIn()

isLoggedIn() : bool

Checks if the current session is logged in.

Returns

bool —

True if the session is logged in, else false.

generateNonce()

generateNonce() : string

Generates and returns the nonce for logins.

Returns

string —

The nonce for logins.

loginAuthCode()

loginAuthCode() : void

Tries to login via an authentication code.

loginPassword()

loginPassword() : void

Tries to login via username and password.

login()

login(string  $userId) : void

Logs the current session in.

Parameters

string $userId

The id of the user who wants to log in.

logout()

logout() : void

Logs out the current user.