files-shared-code-tce-functions-authorization

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

tce_functions_authorization.php

Tags
file

Functions for Authorization / LOGIN

author

Nicola Asuni

since
2001-09-26

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_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
author

Nicola Asuni

since
2006-03-11
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
$user_id :

(int) user ID

Tags
author

Nicola Asuni

since
2006-03-11
Return values
string

F_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
author

Nicola Asuni

since
2012-09-11

F_isSslCertificateValid()

Check if the client has a valid SSL certificate.

F_isSslCertificateValid() : true
Tags
author

Nicola Asuni

since
2013-03-26
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
author

Nicola Asuni

since
2013-07-01
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
author

Nicola Asuni

since
2013-07-01
Return values
string

containing the hash code.

On this page
 

© 2004-2024 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy