Responsive web Framework

DOCUMENTATION

Usr

Contains information regarding the user interacting with the interface

NOT AVAILABLE FOR TINY SCREENS

(minimum width: 480px)

Purpose

Contains information regarding the user that is interacting with the system, such as personal data if it is logged, panel directory, etc.

Values

Internally, the system stores 4 values:

$str_AUTHOR
It is used at the time of creating records, it can have adm or usr value, depending on the administrator or user, respectively.
$str_ADMSUBD
Subdomain where the administrator control panel is located
$str_USRDIR
Subdirectory where the administrator control panel is located
$bool_SIGNED
Boolean flag indicating whether the user has already been signed into the system.

Description

The $usr object belonging to the UserData class is created only once per call, after the debug library call, offering the following methods:

usrSigned()
Returns value whether the user is already signed or not.
usrIs(opt)
It receives a string (opt) that can have the values (adm, usr, privileged or profile). The first two return a Boolean value (1 or 0) indicating whether it is an administrator or a user, respectively. The privileged or profile option is exclusive, returning that value. In case of not specifying value, returns a string consisting of the user type and its identifier, separated by a colon.
usrID()
Obsolete. Subdirectory where the administrator control panel is located
usrName()
Obsolete. Boolean flag indicating whether the user has already been signed into the system.
usrLogin()
Obsolete. Subdirectory where the administrator control panel is located
usrLang()
Obsolete. Boolean flag indicating whether the user has already been signed into the system.
usrRand(str)
Obsolete. Receive an optional parameter; In case of having the value of str returns a string of random characters, if int returns a random number and if no value is received it returns an alphanumeric string. This value is taken from the third field of the cookie session.
usrGet(str)
It replaces the now obsolete functions, being able to receive an optional parameter (str) that returns the corresponding value (Id, name, login, lang, profile, drand, wrand, rand) if the user, as long as it is signed. By default the return value is the user's ID f it is signed or the value of FALSE otherwise.