AUTHORIZE

Logging on and system authorisation class.

version 1
package wikindx4\core\startup
author Mark Grimshaw

 Methods

AUTHORIZE

__construct() 

gatekeeper to the system.

gatekeep() : boolean

Order is of checking is important!

Returns

boolean

Display the empty form for logging on

initLogon(string $error) 

Parameters

$error

string

Default is FALSE

Initial logon to the system.

logonCheck(string $username, string $password) 

Public for use with API. If cleared, user environment is set and embargoed resources checked for clearance, otherwise, user is presented with logon prompt again

Parameters

$username

string

$password

string

Check for any news items in the database

checkNews() 

Clear any expired embargoes

clearEmbargoes() 

failure

failure(string $error) 

In case of failure, Exit back to logon prompt with optional error message

Parameters

$error

string

error Default is FALSE

Initial logon to the system when upgrading the database.

logonCheckUpgradeDB(string $username, string $password) : boolean

Parameters

$username

string

$password

string

Returns

booleanTRUE if not able to authenticate

log out user

logout() 

Various bits of garbage disposal, session is destroyed, cookie is deleted and user is presented with logon prompt

print username/password text boxes

printLogonTable() : string

Returns

string

Successful registered user logon so restore some session variables if they've been stored

restoreEnvironment() 

 Properties

 

$config 
 

$db 
 

$errors 
 

$file 
 

$loadConfig 
 

$messages 
 

$session 
 

$template 
 

$user 
 

$vars