Documentation

FWUser extends User_Setting
in package

Framework user

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Cloudrexx Development Team info@cloudrexx.com

version
1.0.0
subpackage

lib_framework

Table of Contents

Properties

$allowedHosts  : array<string|int, mixed>
Host names which are allowed to redirect on the login/logout function.
$arrStatusMsg  : mixed
$backendMode  : mixed
$objGroup  : UserGroup
User Group
$objUser  : User
User
$objMail  : User_Setting_Mail
The user mail object

Methods

__construct()  : mixed
checkAuth()  : bool
Verify user authentication
checkLogin()  : bool|mixed
Checks the login
getErrorMsg()  : mixed
getFWUserObject()  : FWUser
Returns the static FWUser object
getMail()  : mixed
getParsedUserLink()  : string
Get the user details link
getParsedUserTitle()  : string
Format the author and publisher title
getPasswordRestoreLink()  : mixed
getRawUrL()  : string
Return the Absolute URL associated of the given string.
getRedirectUrl()  : mixed
getSettings()  : array<string|int, mixed>
Returns the current settings array
getUserCount()  : mixed
Return the number of registered users.
getUserLiveSearch()  : void
Activates the user live search.
getUserValidities()  : array<string|int, mixed>
Returns an array containing the available account validity time periods in days in ascending order.
getValidityMenuOptions()  : string
Returns the HTML dropdown menu string for the User account validity period.
getValidityString()  : string
Returns a pretty textual representation of the validity period specified by the $validity argument.
getVerificationLink()  : mixed
hostFromUri()  : string
Returns the host name from the given url www will be striped from the given url
isBackendMode()  : bool
Get the backend mode flag
log()  : mixed
Log the user session.
loginUser()  : mixed
Log in the current user with the object given
logout()  : mixed
Logs the User off and destroys the session.
logoutAndDestroySession()  : mixed
Logs the user off and destroys the session.
mkSECID()  : mixed
Returns a SECID for logging in (Backend, Frontend editing) This is an uppercase four-letter string with no ambiguous characters (like 0/O, l/I etc.).
parseLoggedInOutBlocks()  : mixed
resetPassword()  : mixed
Reset the password of the user using a reset form.
restorePassword()  : bool
Restore password of user account
setLoggedInInfos()  : mixed
setMode()  : mixed
Toggle backend mode on (true) or off (false)
setSettings()  : mixed
showBirthdayUsers()  : mixed
showCurrentlyOnlineUsers()  : mixed
showLastActivUsers()  : mixed
showLatestRegisteredUsers()  : mixed
showNextBirthdayUsers()  : bool
Returns status of next birthday users from user setting
verifyUserAccount()  : mixed
sendRestorePasswordEmail()  : mixed
loadTemplate()  : mixed

Properties

$allowedHosts

Host names which are allowed to redirect on the login/logout function.

public static array<string|int, mixed> $allowedHosts = array()

eg : (http://example.com, http://www.example.com)

$arrStatusMsg

public mixed $arrStatusMsg = array('ok' => array(), 'error' => array())

Methods

__construct()

public __construct([mixed $backend = false ]) : mixed
Parameters
$backend : mixed = false

checkAuth()

Verify user authentication

public checkAuth() : bool
Return values
bool

True if authentication is okay, false otherwise

checkLogin()

Checks the login

public checkLogin() : bool|mixed
Return values
bool|mixed

false or user id

getFWUserObject()

Returns the static FWUser object

public static getFWUserObject() : FWUser
Tags
throws
Exception

In case $objInit is not yet defined. $objInit gets initialized in postComponentLoad hook of Locale component.

Return values
FWUser

Get the user details link

public static getParsedUserLink(mixed $user) : string
Parameters
$user : mixed

\User or \Cx\Core\User\Model\Entity\User or $userId (Id of a user)

Return values
string

Returns the parsed user detail link(crm and access)

getParsedUserTitle()

Format the author and publisher title

public static getParsedUserTitle(mixed $user[, mixed $name = '' ][, mixed $showUsername = false ]) : string
Parameters
$user : mixed
$name : mixed = ''
$showUsername : mixed = false
Tags
global

array

Return values
string

Generated user title

public static getPasswordRestoreLink(mixed $isBackendMode, mixed $objUser[, mixed $websitePath = null ]) : mixed
Parameters
$isBackendMode : mixed
$objUser : mixed
$websitePath : mixed = null

getRawUrL()

Return the Absolute URL associated of the given string.

public static getRawUrL(mixed $url, mixed $baseUrl) : string
Parameters
$url : mixed
$baseUrl : mixed
Return values
string

The URL

getRedirectUrl()

public static getRedirectUrl(mixed $redirectUrl) : mixed
Parameters
$redirectUrl : mixed

getSettings()

Returns the current settings array

public static getSettings([bool $reload = false ]) : array<string|int, mixed>

Note that the records are read from the database on the first call and stored locally. Successive calls will yield the same array, regardless of changes made to the table, unless $reload is set to true.

Parameters
$reload : bool = false

Force reloading if true. Defaults to false

Tags
global

ADOConnection $objDatabase

staticvar

array $arrSettings The settings array

static
Return values
array<string|int, mixed>

The settings array

getUserCount()

Return the number of registered users.

public static getUserCount() : mixed

Only users with an active and valid account are counted. global ADONewConnection Return integer

getUserValidities()

Returns an array containing the available account validity time periods in days in ascending order.

public static getUserValidities() : array<string|int, mixed>
Tags
global

ADONewConnection

static
Return values
array<string|int, mixed>

The time periods

getValidityMenuOptions()

Returns the HTML dropdown menu string for the User account validity period.

public static getValidityMenuOptions([int $selectedValidity = 0 ][, string $attrs = '' ]) : string
Parameters
$selectedValidity : int = 0

The selected validity period in days. Defaults to 0 (zero).

$attrs : string = ''

Additional attributes for the menu, to be included in the <SELECT> tag.

Return values
string

The HTML dropdown menu code

getValidityString()

Returns a pretty textual representation of the validity period specified by the $validity argument.

public static getValidityString(int $validity) : string
Parameters
$validity : int

Validity period in days

Return values
string

The textual representation

public static getVerificationLink(mixed $isBackendMode, mixed $objUser[, mixed $domain = '' ]) : mixed
Parameters
$isBackendMode : mixed
$objUser : mixed
$domain : mixed = ''

hostFromUri()

Returns the host name from the given url www will be striped from the given url

public static hostFromUri(string $uri) : string
Parameters
$uri : string

url string

Return values
string

isBackendMode()

Get the backend mode flag

public isBackendMode() : bool
Return values
bool

Backend mode is on if this evaluates to boolean true.

log()

Log the user session.

public log() : mixed

Create a log entry in the database containing the users' details.

Tags
global

ADONewConnection

loginUser()

Log in the current user with the object given

public loginUser(mixed $objUser) : mixed
Parameters
$objUser : mixed

the user to be logged in

logout()

Logs the User off and destroys the session.

public logout() : mixed

If the User was in backend mode, redirects her to the frontend home page. Otherwise, if a redirect was requested, the desired page is called. If no redirect parameter is present, the frontend login page is shown.

logoutAndDestroySession()

Logs the user off and destroys the session.

public logoutAndDestroySession() : mixed

mkSECID()

Returns a SECID for logging in (Backend, Frontend editing) This is an uppercase four-letter string with no ambiguous characters (like 0/O, l/I etc.).

public static mkSECID() : mixed

parseLoggedInOutBlocks()

public static parseLoggedInOutBlocks(mixed &$template[, mixed $page = null ]) : mixed
Parameters
$template : mixed
$page : mixed = null

resetPassword()

Reset the password of the user using a reset form.

public resetPassword(mixed $email, mixed $restoreKey[, mixed $password = null ][, mixed $confirmedPassword = null ][, mixed $store = false ]) : mixed
Parameters
$email : mixed
$restoreKey : mixed
$password : mixed = null
$confirmedPassword : mixed = null
$store : mixed = false
Tags
access

public

global

array Core language array

restorePassword()

Restore password of user account

public restorePassword(string $email[, bool $sendNotificationEmail = true ][, bool $discloseAccountIssues = false ][, bool $artificiallyDelayResponse = true ]) : bool

Generates a restore-key and sends it (through static::sendRestorePasswordEmail()) to the email address $email by e-mail.

Parameters
$email : string

The e-mail address of the account to reset the password for.

$sendNotificationEmail : bool = true

Set to false to only generate the restore-key, but not send the e-mail message containing the restore-key.

$discloseAccountIssues : bool = false

Set to true to return false in case no account exists by email $email or mail delivery to $email failed. If set, then the key error of static::arrStatusMsg will be populated with an appropriate error message.

$artificiallyDelayResponse : bool = true

By default this method will block until the script runtime has reached 1 second. Set to false to return immediately.

Tags
global

array $_CORELANG

Return values
bool

Always returns true unless there is an issue in dispatching the e-mail. If $discloseAccountIssues is set to true, then false is also being returned in case $email is not a valid user account.

setLoggedInInfos()

public setLoggedInInfos(mixed $objTemplate[, mixed $blockName = '' ]) : mixed
Parameters
$objTemplate : mixed
$blockName : mixed = ''

setMode()

Toggle backend mode on (true) or off (false)

public setMode([bool $backend = false ]) : mixed
Parameters
$backend : bool = false

Turn on backend mode if true, off otherwise.

setSettings()

public static setSettings(mixed $arrSettings) : mixed
Parameters
$arrSettings : mixed

showBirthdayUsers()

public static showBirthdayUsers() : mixed

showCurrentlyOnlineUsers()

public static showCurrentlyOnlineUsers() : mixed

showLastActivUsers()

public static showLastActivUsers() : mixed

showLatestRegisteredUsers()

public static showLatestRegisteredUsers() : mixed

showNextBirthdayUsers()

Returns status of next birthday users from user setting

public static showNextBirthdayUsers() : bool
Return values
bool

returns true if function is active

verifyUserAccount()

public verifyUserAccount(mixed $email, mixed $key) : mixed
Parameters
$email : mixed
$key : mixed

sendRestorePasswordEmail()

protected sendRestorePasswordEmail(mixed $objUser) : mixed
Parameters
$objUser : mixed

loadTemplate()

private static loadTemplate(mixed $template) : mixed
Parameters
$template : mixed

        
On this page

Search results