Zenphoto_Authority Zenphoto_Authority(
)
|
|
class instantiator
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 |
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 |
mixed deleteAdmin(
array
$constraints
)
|
|
Deletes admin record(s)
Parameters:
|
array |
$constraints: |
field value pairs for constraining the delete |
API Tags:
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 |
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
array getOptionsSupported(
)
|
|
Declares options used by lib-auth
void getRights(
[$version
$version = NULL]
)
|
|
Returns an array of the rights definitions for $version (default returns current version rights)
Parameters:
lib_auth_options lib_auth_options(
)
|
|
class instantiatio function
void migrateAuth(
int
$oldversion
)
|
|
Migrates credentials
Parameters:
object newAdministrator(
$name
$name, [$valid
$valid = 1]
)
|
|
Instantiates and returns administrator object
Parameters:
|
$name |
$name: |
|
|
$valid |
$valid: |
|
string passwordHash(
string
$user, string
$pass
)
|
|
Returns the hash of the zenphoto password
Parameters:
|
string |
$user: |
|
|
string |
$pass: |
|
Returns text describing password constraints
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 |
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:
string validatePassword(
string
$pass
)
|
|
Checks to see if password follows rules Returns error message if not.
Parameters: