Overview

Classes

  • Ws_logged_inModel
  • Ws_permissionsModel
  • Ws_role_permModel
  • Ws_rolesModel
  • Ws_user_roleModel
  • Ws_userModel
  • WsAuth
  • WsauthController
  • WsChart
  • WsConfig
  • WsController
  • WsDatabase
  • WsForm
  • WsImage
  • WsLocalize
  • WsModel
  • WsModelForm
  • WsModelGridView
  • WsUrl

Functions

  • __autoload
  • callHook
  • WsErrorHandler
  • Overview
  • Class

Class WsAuth

WsAuth Base class for user authentication.

Example usage:

$auth = new WsAuth();

//check if any user is logged in
if ($auth->checkSessioun()) {
.
.
.
}

// check if logged in user has specific permission
if ($auth->hasPermission('perm_name')) {
.
.
.
}
Located at WsAuth.class.php
Methods summary
public
# __construct( )
public boolean
# createUser( string $email, string $password )

Create new user record.

Create new user record.

Parameters

$email
User email
$password
User password

Returns

boolean
public boolean
# login( string $email, string $password )

Login existing user and star user session.

Login existing user and star user session.

Parameters

$email
User email address
$password
User password

Returns

boolean
public boolean
# checkSession( )

Checks current user session.

Checks current user session.

Returns

boolean
public
# logout( )
public boolean
# hasPermission( string $perm )

check if user has specific permission

check if user has specific permission

Parameters

$perm
Permission name

Returns

boolean
public string
# currentUser( )

return email address of current logged in user

return email address of current logged in user

Returns

string
public integer
# currentUserID( )

return ID of current logged in user

return ID of current logged in user

Returns

integer
Properties summary
public $isUsable

checks if database object is available. Database is needed for WsAuth module.

checks if database object is available. Database is needed for WsAuth module.

#
API documentation generated by ApiGen