tce_functions_authorization.php
Tags
Table of Contents
Functions
- F_loginForm() : XHTML
- Returns XHTML / CSS formatted string for login form.<br> The CSS classes used are: <ul> <li>div.login_form : container for login box</li> <li>div.login_form div.login_row : container for label + input field or button</li> <li>div.login_form div.login_row span.label : container for input label</li> <li>div.login_form div.login_row span.formw : container for input form</li> </ul>
- F_login_form() : mixed
- Display login page.
- F_logout_form() : XHTML
- Display logout form.
- F_logout_page() : mixed
- Display logout page.
- F_isAuthorizedUser() : bool
- Returns true if the current user is authorized to update and delete the selected database record.
- F_getAuthorizedUsers() : string
- Returns a comma separated string of ID of the users that belong to the same groups.
- F_syncUserGroups() : mixed
- Sync user groups with the ones specified on the configuration file for alternate authentication.
- F_isSslCertificateValid() : true
- Check if the client has a valid SSL certificate.
- F_getSSLCertificateHash() : array<string|int, mixed>
- Get the hash code of the specified SSL certificate
- F_getSSLClientHash() : string
- Get the hash code for the client certificate
Functions
F_loginForm()
Returns XHTML / CSS formatted string for login form.<br> The CSS classes used are: <ul> <li>div.login_form : container for login box</li> <li>div.login_form div.login_row : container for label + input field or button</li> <li>div.login_form div.login_row span.label : container for input label</li> <li>div.login_form div.login_row span.formw : container for input form</li> </ul>
F_loginForm(mixed $faction,
mixed $fid,
mixed $fmethod,
mixed $fenctype,
mixed $username)
: XHTML
Parameters
- $faction : mixed
- $fid : mixed
- $fmethod : mixed
- $fenctype : mixed
- $username : mixed
Return values
XHTML —string for login form
F_login_form()
Display login page.
F_login_form()
: mixed
NOTE: This function calls exit() after execution.
F_logout_form()
Display logout form.
F_logout_form()
: XHTML
Return values
XHTML —string for logout form.
F_logout_page()
Display logout page.
F_logout_page()
: mixed
NOTE: This function calls exit() after execution.
F_isAuthorizedUser()
Returns true if the current user is authorized to update and delete the selected database record.
F_isAuthorizedUser( $table,
$field_id_name,
$value_id,
$field_user_id)
: bool
Parameters
- $table :
-
(string) table to be modified
- $field_id_name :
-
(string) name of the main ID field of the table
- $value_id :
-
(int) value of the ID field of the table
- $field_user_id :
-
(string) name of the foreign key to to user_id
Tags
Return values
bool —true if the user is authorized, false otherwise
F_getAuthorizedUsers()
Returns a comma separated string of ID of the users that belong to the same groups.
F_getAuthorizedUsers( $user_id)
: string
Parameters
Tags
Return values
stringF_syncUserGroups()
Sync user groups with the ones specified on the configuration file for alternate authentication.
F_syncUserGroups( $usrid,
$grpids)
: mixed
Parameters
- $usrid :
-
(int) ID of the user to update.
- $grpids :
-
(mixed) Group ID or comma separated list of group IDs (0=all available groups).
Tags
F_isSslCertificateValid()
Check if the client has a valid SSL certificate.
F_isSslCertificateValid()
: true
Tags
Return values
true —if the client has a valid SSL certificate, false otherwise.
F_getSSLCertificateHash()
Get the hash code of the specified SSL certificate
F_getSSLCertificateHash(string $cert[,
bool $pkcs12
= false
]) : array<string|int,
mixed>
Parameters
- $cert : string
-
String containing the certificate data.
- $pkcs12 : bool = false
-
Set this variable to true if the certificate is in PKCS12 format.
Tags
Return values
array<string|int, mixed> —containing the hash code and the validity end date in unix epoch.
F_getSSLClientHash()
Get the hash code for the client certificate
F_getSSLClientHash()
: string
Tags
Return values
string —containing the hash code.