Returns an admin object from the $pat:$criteria
Parameters:
array |
$criteria: |
[ match => criteria ] |
static void getAuthCookies(
)
|
|
returns an array of the active "password" cookies
NOTE: this presumes the general form of an authrization cookie is: zp_xxxxx_auth{_dddd) where xxxxx is the authority (e.g. gallery, image, search, ...) and dddd if present is the object id.
static void getResetTicket(
$user,
$pass
)
|
|
Parameters:
static void getRights(
[$version
$version = NULL]
)
|
|
Returns an array of the rights definitions for $version (default returns current version rights)
Parameters:
static void getVersion(
)
|
|
static void handleLogout(
)
|
|
Cleans up on logout
static void logUser(
object
$user
)
|
|
Set log-in cookie for a user
Parameters:
static object newAdministrator(
$name
$name, [$valid
$valid = 1]
)
|
|
Instantiates and returns administrator object
Parameters:
$name |
$name: |
|
$valid |
$valid: |
|
static string passwordHash(
string
$user, string
$pass, [
$hash_type = NULL]
)
|
|
Returns the hash of the zenphoto password
Parameters:
string |
$user: |
|
string |
$pass: |
|
|
$hash_type: |
|
static string pbkdf2(
string
$p, string
$s, [int
$c = 1000], [int
$kl = 32], [string
$a = 'sha256']
)
|
|
PBKDF2 Implementation (described in RFC 2898)
Parameters:
string |
$p: |
p password |
string |
$s: |
s salt |
int |
$c: |
c iteration count (use 1000 or higher) |
int |
$kl: |
kl derived key length |
string |
$a: |
a hash algorithm |
API Tags:
static void printPasswordForm(
[
$id = ''], [
$pad = false], [
$disable = NULL], [
$required = false], [
$flag = '']
)
|
|
Parameters:
|
$id: |
|
|
$pad: |
|
|
$disable: |
|
|
$required: |
|
|
$flag: |
|
static void printPasswordFormJS(
)
|
|
Javascript for password change input handling
static mixed updateAdminField(
string
$update, mixed
$value, array
$constraints
)
|
|
Updates a field in admin record(s)
Parameters:
string |
$update: |
name of the field |
mixed |
$value: |
what to store |
array |
$constraints: |
on the update [ field<op>,value ] |
API Tags:
lib_auth_options __construct(
)
|
|
class instantiation function
bit checkAuthorization(
string
$authCode, int
$id
)
|
|
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 hash code to check |
int |
$id: |
whom we think this is |
void checkCookieCredentials(
)
|
|
Checks saved cookies to see if a user is logged in
object checkLogon(
string
$user, string
$pass
)
|
|
Checks a logon user/password against admins
Returns the user object if there is a match
Parameters:
string |
$user: |
|
string |
$pass: |
|
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(
[
$what = 'users'], string
$what:
)
|
|
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
Parameters:
string |
$what:: |
'all' for everything, 'users' for just users 'groups' for groups and templates |
|
$what: |
|
array getOptionsSupported(
)
|
|
Declares options used by lib-auth
User authentication support
void handleOption(
$option,
$currentValue
)
|
|
Dummy for object inheritance purposes
Parameters:
void isMasterUser(
$user
)
|
|
Parameters:
void migrateAuth(
$to, int
$oldversion
)
|
|
Migrates credentials
Parameters:
void printLoginForm(
[string
$redirect = null], [bool
$logo = true], [bool
$showUserField = true], [bool
$showCaptcha = true], [string
$hint = '']
)
|
|
Print the login form for ZP. This will take into account whether mod_rewrite is enabled or not.
Parameters:
string |
$redirect: |
URL to return to after login |
bool |
$logo: |
set to true to display the ADMIN zenphoto logo. |
bool |
$showUserField: |
set to true to display the user input |
bool |
$showCaptcha: |
set to false to not display the forgot password captcha. |
string |
$hint: |
optional hint for the password |
void validateTicket(
$ticket,
$user
)
|
|
Parameters: