$AdminLevel
$AdminLevel :integer
The jump mark for admin group level
GetTokenList(boolean $refresh = false,integer $count = null): \FAA\Obj\Result
Get user token list This is the abstract interface to refresh the anti XSRF token list.
boolean | $refresh | When set to true, do a refresh of the token list |
integer | $count | When set, this amount of new tokens is provided |
A default system result set
GetAccessList(\FAA\Obj\Request $request): \FAA\Obj\Result
get user access list This is the abstract interface for regular system logouts
\FAA\Obj\Request | $request |
A default system result set
OauthRefresh(\FAA\Obj\Request $request)
\FAA\Obj\Request | $request |
OauthLogin(\FAA\Obj\Request $request): integer
perform oauth login This is the abstract interface for regular system logins, it uses the defined post vars to determinate the corresponding user
\FAA\Obj\Request | $request |
A http response code
WebLogin(\FAA\Obj\Request $request): \FAA\Obj\Result
Perform web login
This is the abstract interface for regular system login, it uses the defined post vars to determinate the corresponding user It does supp post paramters as http_post string as well as json like all endpoints
\FAA\Obj\Request | $request |
A default system result set
FindUser(string $search,string $field = 'alias',string $language = null): \FAA\Obj\Result
Find single user Search the user list by single attribute
string | $search | The search value |
string | $field | The field to search in |
string | $language | Language id or null |
A system result object
FindUserByAlias(array $data,string $language = null,boolean $to_plain = false): \FAA\Obj\Result
Find list of users Load list of user accounts
array | $data | A search setup object, @see ObjectHandler::FilterTypeListAssoc() |
string | $language | The language to search in |
boolean | $to_plain | Convert to plain object when loading |
A default system result object with user list
FindSingleUserByAlias(array $data,string $language = null): \FAA\Obj\Generic\User
Find a single user by name Load list of user accounts and when only one user was found, return it
array | $data | A search setup object, @see ObjectHandler::FilterTypeListAssoc() |
string | $language | The language to search in |
A user or null when not unique
GetGroup(string $id): null|\FAA\Obj\Generic\Group
Fetch group Load a single user group instance
string | $id | A group object id |
A system user group object or null
Login(array $credentials): \FAA\Obj\Result
The login interface Registers the desired user as current session account when credentials are fitting Supports the FAA_SESSION_PHOENIX_ACCOUNT for drive by login and calls the On2FactorRequired hook after login.
array | $credentials | The request with at least: name string a system user name password string a system user password source string The source url of this request ignore_second bool Skip the hook on demand |
a default system result object
CompareUsersLevel(\FAA\Obj\Generic\User $user1,\FAA\Obj\Generic\User $user2): integer
compare two users compares the level of two users and returns the difference, lower values say user2 has higher level
\FAA\Obj\Generic\User | $user1 | The admin user account |
\FAA\Obj\Generic\User | $user2 | The system user account |
The level difference, e.g. -1 say user 2 has higher level than user 1
ResetPassword(string $password,string $token,string $language): \FAA\Obj\Result
reset a user password when the given token is linked to an existing account the function will override the users password
string | $password | The new password |
string | $token | The activation token |
string | $language | The request language code |
A default system result object
RegisterResetPassword(array $payload,array $setup = array()): \FAA\Obj\Result
register reset a user password registers a rest token to a user account and send a mail to registered email address with reset instructions
array | $payload | The set of username/alias and password |
array | $setup | The mail preset that should be used, should contain language and template name |
A default system result object
SendResetPasswordInstructions(\FAA\Obj\Generic\User $user,array $setup,string|null $password = null): \FAA\Obj\Result
Register the reset token and send the email with the reset link
\FAA\Obj\Generic\User | $user | The user object |
array | $setup | The template setup |
string|null | $password | The new password |
The result
RegisterUser(array $data,array $options = array()): \FAA\Obj\Result
Register a new user registers a new user into the system, will send welcome email when template defined in options
array | $data | The basic attributes of th user surname string the users last name firstname string the users first name emailaddress string the users email address or, none for dynamic created one alias string the users account login alias or, none for dynamic created one password string the users password or empty for dynamic created one external string the external id in app register mode, e.g. a facebook id dateformat string The dat format, defaults to 'DD.MM.YYYY HH:mm' active bool The users initial activation state, defaults to true groups array List of initial groups {key: 'group', value: [...]}, defaults to 'customer' |
array | $options | Configuration options for this function language string the request language code mail_register string the key for the registration mail preset |
a default system result object
SendRegisterMail(string $template,string $language,\FAA\Obj\Generic\User $user,array $data): \FAA\Obj\Result
Send registration email Sends an email to the newly generated user based on the given language and preset name.
string | $template | The template name |
string | $language | The target language |
\FAA\Obj\Generic\User | $user | The user |
array | $data | The payload from creation |
A system result object
SetSessionVar(string $key,mixed $value = null,boolean $permanent = false): boolean
Set session variable Set a new session variable in the super global session
string | $key | The array key |
mixed | $value | If no value was given the entry will be deleted |
boolean | $permanent | If set to true the system will try to persist this var in the user session storage |
True when setting was successful, that is the regular case.
GetPersistentSessionVar(string $key = null): mixed
Get persistent session variable Get a registered session variable from the super global session
string | $key | The array key or, null for whole persistent session data |
If no value was found, return null
SetPersistentSessionVar(string $key,mixed $value): boolean
Set persistent session variable Set a session variable in the persistent session storage
string | $key | The array key |
mixed | $value | If null value is given the entry will be deleted |
True when setting was successful, that is the regular case.