Properties

$authId

$authId

$sessionName

$sessionName

$tableName

$tableName

$dao

$dao

$_immediateRedirect

$_immediateRedirect

Methods

__construct()

__construct(string $sessionName, string $tableName, int $authId)

Parameters

string $sessionName

The session key under which the user id may be found

string $tableName

The user table name

int $authId

The authentication id

addGroup()

addGroup(string $group) : int

add a new group with given name

Parameters

string $group

Returns

int —

group ID

addGroupRight()

addGroupRight(string $group, string $right) : boolean

adds a right to a group

if either is not set, this method will create group and right

Parameters

string $group

group name

string $right

right name

Returns

boolean

addImplication()

addImplication(string $right, string $implies) : boolean

adds an implication for given right

Parameters

string $right

right name, which implies

string $implies

right name for right to imply

Returns

boolean

appExists()

appExists(string $appName) : mixed

returns the id if app exists or false

Parameters

string $appName

Returns

mixed

checkAuth()

checkAuth(string $authName) : mixed

check if given auth name exists, creates if it does not

Parameters

string $authName

Returns

mixed —

id or false

checkRight()

checkRight(string $right, int $level) : mixed

checks if right exists

Parameters

string $right

right name

int $level

level

Returns

mixed —

id or false

groupExists()

groupExists(string $group) : mixed

checks if group exists

Parameters

string $group

Returns

mixed —

id or false

hasRight()

hasRight( $right)

Parameters

$right

rightExists()

rightExists(string $right) : mixed

checks if given right exists

Parameters

string $right

Returns

mixed —

id or false

__destruct()

__destruct()

getAuth()

getAuth()

logout()

logout()

passwordEncrypt()

passwordEncrypt( $password)

Parameters

$password

randomString()

randomString( $len)

Parameters

$len

getTranslations()

getTranslations( $idMember)

Parameters

$idMember

getImage()

getImage( $paramIdMember)

Parameters

$paramIdMember

getDummyImage()

getDummyImage(\unknown_type $Gender, \unknown_type $HideGender) : \unknown

Returns the path to an appropriate dummy image in case no image is found.

Parameters

\unknown_type $Gender
\unknown_type $HideGender

Returns

\unknown

isBWLoggedIn()

isBWLoggedIn( $ExtraAllowedStatus) : boolean

check if the user is a logged in member @$ExtraAllowedStatus allows for a list, comma separated of extra status which can be allowed for members in addition to the basic Active and ActiveHidden members.Status this means that in the default case : (IsLoggedIn()) will return true only if the member has a session with an IdMember and a Status like Active or ActiveHidden in the extended cases (IsLoggedIn("Pending")) will also return true if the member has a a status set to Pending, this allow to give specific access to other members than the one with Active or ActiveHiddend Status

Parameters

$ExtraAllowedStatus

Returns

boolean

addApp()

addApp(string $name) : int

add a new application with given name

Parameters

string $name

Returns

int —

application ID

setAuth()

setAuth( $authId)

Parameters

$authId

doLogin()

doLogin( $handle,  $password)

Parameters

$handle
$password

doBWLogin()

doBWLogin( $handle)

Parameters

$handle

getAuthId()

getAuthId( $userId)

Parameters

$userId

doBWLogin1()

doBWLogin1( $handle,  $password)

Parameters

$handle
$password

setupBWSession()

setupBWSession( $handle)

Parameters

$handle

updateUser()

updateUser( $handle,  $password)

Parameters

$handle
$password

_parseRight()

_parseRight(string $right) : array

parsing given right

rights are always in the form: RIGHTNAME[@APPLICATION]

if no application is provided, we assume it's a global right

Parameters

string $right

Returns

array —

with keys "name" and "app" (optional)