tce__functions__authorization_8php

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 File Reference

Namespaces

 com\tecnick\tcexam\shared
 TCExam Shared Area.
 

Functions

 F_loginForm ($faction, $fid, $fmethod, $fenctype, $username)
 
 F_login_form ()
 
 F_logout_form ()
 
 F_logout_page ()
 
 F_isAuthorizedUser ($table, $field_id_name, $value_id, $field_user_id)
 
 F_getAuthorizedUsers ($user_id)
 
 F_syncUserGroups ($usrid, $grpids)
 
 F_isSslCertificateValid ()
 
 F_getSSLCertificateHash ($cert, $pkcs12=false)
 
 F_getSSLClientHash ()
 

Detailed Description

Functions for Authorization / LOGIN

Function Documentation

F_getAuthorizedUsers (   $user_id)

Returns a comma separated string of ID of the users that belong to the same groups.

Author
Nicola Asuni
Since
2006-03-11
Parameters
$user_id(int) user ID
Returns
string

F_getSSLCertificateHash (   $cert,
  $pkcs12 = false 
)

Get the hash code of the specified SSL certificate

Parameters
string$certString containing the certificate data.
boolean$pkcs12Set this variable to true if the certificate is in PKCS12 format.
Returns
array containing the hash code and the validity end date in unix epoch.
Author
Nicola Asuni
Since
2013-07-01

F_getSSLClientHash ( )

Get the hash code for the client certificate

Returns
string containing the hash code.
Author
Nicola Asuni
Since
2013-07-01

F_isAuthorizedUser (   $table,
  $field_id_name,
  $value_id,
  $field_user_id 
)

Returns true if the current user is authorized to update and delete the selected database record.

Author
Nicola Asuni
Since
2006-03-11
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
Returns
boolean true if the user is authorized, false otherwise

F_isSslCertificateValid ( )

Check if the client has a valid SSL certificate.

Returns
true if the client has a valid SSL certificate, false otherwise.
Author
Nicola Asuni
Since
2013-03-26

F_login_form ( )

Display login page. NOTE: This function calls exit() after execution.

F_loginForm (   $faction,
  $fid,
  $fmethod,
  $fenctype,
  $username 
)

Returns XHTML / CSS formatted string for login form.
The CSS classes used are:

  • div.login_form : container for login box
  • div.login_form div.login_row : container for label + input field or button
  • div.login_form div.login_row span.label : container for input label
  • div.login_form div.login_row span.formw : container for input form
Parameters
factionString action attribute
fidString form ID attribute
fmethodString method attribute (get/post)
fenctypeString enctype attribute
usernameString user name
Returns
XHTML string for login form

F_logout_form ( )

Display logout form.

Returns
XHTML string for logout form.

F_logout_page ( )

Display logout page. NOTE: This function calls exit() after execution.

F_syncUserGroups (   $usrid,
  $grpids 
)

Sync user groups with the ones specified on the configuration file for alternate authentication.

Parameters
$usrid(int) ID of the user to update.
$grpids(mixed) Group ID or comma separated list of group IDs (0=all available groups).
Author
Nicola Asuni
Since
2012-09-11

 

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