[ class tree: functions ] [ index: functions ] [ all elements ]

Class: Zenphoto_Authority

Source Location: /lib-auth.php

Class Zenphoto_Authority

Property Summary
mixed   $admin_users  
mixed   $rightsset  
mixed   $version  

[ Top ]
Method Summary
Zenphoto_Authority   Zenphoto_Authority()   class instantiator
bit   checkAuthorization()   Retuns the administration rights of a saved authorization code Will promote an admin to ADMIN_RIGHTS if he is the most privileged admin
bool   checkLogon()   Checks a logon user/password against the list of admins
mixed   deleteAdmin()   Deletes admin record(s)
array   getAdminEmail()   Returns the email addresses of the Admin with ADMIN_USERS rights
array   getAdministrators()   Returns an array of admin users, indexed by the userid and ordered by "privileges"
array   getOptionsSupported()   Declares options used by lib-auth
void   getRights()   Returns an array of the rights definitions for $version (default returns current version rights)
void   getVersion()  
lib_auth_options   lib_auth_options()   class instantiatio function
void   migrateAuth()   Migrates credentials
object   newAdministrator()   Instantiates and returns administrator object
string   passwordHash()   Returns the hash of the zenphoto password
string   passwordNote()   Returns text describing password constraints
string   saveAdmin()   Saves an admin user's settings
mixed   updateAdminField()   Updates a field in admin record(s)
string   validatePassword()   Checks to see if password follows rules Returns error message if not.

[ Top ]
Properties
mixed   $admin_users = NULL [line 50]

[ Top ]
mixed   $rightsset = NULL [line 51]

[ Top ]
mixed   $version = 1 [line 52]

[ Top ]
Methods
Constructor Zenphoto_Authority  [line 58]

  Zenphoto_Authority Zenphoto_Authority( )

class instantiator



[ Top ]
checkAuthorization  [line 285]

  bit checkAuthorization( string $authCode  )

Retuns the administration rights of a saved authorization code Will promote an admin to ADMIN_RIGHTS if he is the most privileged admin

Parameters:
string   $authCode:  the md5 code to check


[ Top ]
checkLogon  [line 338]

  bool checkLogon( string $user, string $pass, bool $admin_login  )

Checks a logon user/password against the list of admins

Returns true if there is a match

Parameters:
string   $user: 
string   $pass: 
bool   $admin_login:  will be true if the login for the backend. If false, it is a guest login beging checked for admin credentials


[ Top ]
deleteAdmin  [line 477]

  mixed deleteAdmin( array $constraints  )

Deletes admin record(s)

Parameters:
array   $constraints:  field value pairs for constraining the delete

API Tags:
Return:  Query result


[ Top ]
getAdminEmail  [line 362]

  array getAdminEmail( [bit $rights = NULL]  )

Returns the email addresses of the Admin with ADMIN_USERS rights

Parameters:
bit   $rights:  what kind of admins to retrieve


[ Top ]
getAdministrators  [line 256]

  array getAdministrators( )

Returns an array of admin users, indexed by the userid and ordered by "privileges"

The array contains the id, hashed password, user's name, email, and admin privileges



[ Top ]
getOptionsSupported  [line 603]

  array getOptionsSupported( )

Declares options used by lib-auth



[ Top ]
getRights  [line 524]

  void getRights( [$version $version = NULL]  )

Returns an array of the rights definitions for $version (default returns current version rights)

Parameters:
$version   $version: 


[ Top ]
getVersion  [line 583]

  void getVersion( )



[ Top ]
lib_auth_options  [line 592]

  lib_auth_options lib_auth_options( )

class instantiatio function



[ Top ]
migrateAuth  [line 387]

  void migrateAuth( int $oldversion  )

Migrates credentials

Parameters:
int   $oldversion: 


[ Top ]
newAdministrator  [line 515]

  object newAdministrator( $name $name, [$valid $valid = 1]  )

Instantiates and returns administrator object

Parameters:
$name   $name: 
$valid   $valid: 


[ Top ]
passwordHash  [line 68]

  string passwordHash( string $user, string $pass  )

Returns the hash of the zenphoto password

Parameters:
string   $user: 
string   $pass: 


[ Top ]
passwordNote  [line 121]

  string passwordNote( )

Returns text describing password constraints



[ Top ]
saveAdmin  [line 169]

  string saveAdmin( string $user, string $pass, string $name, string $email, bit $rights, array $objects, [string $custom = ''], [ $group = ''], [ $valid = 1], [int $quota = NULL]  )

Saves an admin user's settings

Parameters:
string   $user:  The username of the admin
string   $pass:  The password associated with the user name
string   $name:  The display name of the admin
string   $email:  The email address of the admin
bit   $rights:  The administrating rites for the admin
string   $custom:  custom data for the administrator
array   $objects:  an array of zenphoto objects that the admin can access.
int   $quota:  Total image size quoat
   $group: 
   $valid: 

API Tags:
Return:  error message if any errors


[ Top ]
updateAdminField  [line 494]

  mixed updateAdminField( string $field, mixed $value, array $constraints  )

Updates a field in admin record(s)

Parameters:
string   $field:  name of the field
mixed   $value:  what to store
array   $constraints:  field value pairs for constraining the update

API Tags:
Return:  Query result


[ Top ]
validatePassword  [line 82]

  string validatePassword( string $pass  )

Checks to see if password follows rules Returns error message if not.

Parameters:
string   $pass: 


[ Top ]

Documentation generated on Mon, 09 Aug 2010 17:24:06 +0200 by phpDocumentor 1.4.1