File/includes/user-imap.php

Description

Authentication functions.

This file contains all the functions for getting information about users and authenticating them using an IMAP server.

Note: this application assumes that usernames (logins) are unique.

Note #2: If you are using HTTP-based authentication, then you still need these functions and you will still need to add users to webcal_user.

  • author: Craig Knudsen <cknudsen@cknudsen.com>
  • version: $Id$
  • copyright: Craig Knudsen, <cknudsen@cknudsen.com>, http://www.k5n.us/cknudsen
  • license: GNU GPL
Functions
quoteIMAP (line 50)

quoteIMAP($str)

quote char's into valid IMAP string

$str - String to be quoted

Returns: quoted string

void quoteIMAP ( $str)
  • $str
user_add_user (line 273)

Add a new user.

  • return: True on success
  • global: string $error: Error message
bool user_add_user (string $user, string $password, string $firstname, string $lastname, string $email, string $admin, [ $enabled = 'Y'])
  • string $user: User login
  • string $password: User password
  • string $firstname: User first name
  • string $lastname: User last name
  • string $email: User email address
  • string $admin: Is the user an administrator? ('Y' or 'N')
  • $enabled
user_delete_user (line 391)

Delete a user from the system.

This will also delete any of the user's events in the system that have no other participants. Any layers that point to this user will be deleted. Any views that include this user will be updated.

void user_delete_user (string $user)
  • string $user: User to delete
user_get_users (line 515)

Get a list of users and return info in an array.

  • return: Array of user info
array user_get_users ([ $publicOnly = false])
  • $publicOnly
user_load_variables (line 208)

Load info about a user (first name, last name, admin) and set globally.

  • return: True on success
bool user_load_variables ( $login, string $prefix, string $user)
  • string $user: User login
  • string $prefix: Variable prefix to use
  • $login
user_update_user (line 325)

Update a user.

  • return: True on success
  • global: string $error: Error message
bool user_update_user (string $user, string $firstname, string $lastname,  $email, string $admin, [ $enabled = 'Y'], string $mail)
  • string $user: User login
  • string $firstname: User first name
  • string $lastname: User last name
  • string $mail: User email address
  • string $admin: Is the user an administrator? ('Y' or 'N')
  • $email
  • $enabled
user_update_user_password (line 371)

Update user password.

  • return: True on success
  • global: string $error: Error message
bool user_update_user_password (string $user, string $password)
  • string $user: User login
  • string $password: User password
user_valid_crypt (line 171)

Check to see if a given login/crypted password is valid.

If invalid, the error message will be placed in $error.

  • return: True on success
  • global: string $error: Error message
bool user_valid_crypt (string $login, string $crypt_password)
  • string $login: User login
  • string $crypt_password: Encrypted user password
user_valid_login (line 67)

Check to see if a given login/password is valid.

If invalid, the error message will be placed in $error.

  • return: True on success
  • global: string $error: Error message
bool user_valid_login (string $login, string $password)
  • string $login: User login
  • string $password: User password

Documentation generated on Thu, 10 Jun 2010 17:08:38 -0400 by phpDocumentor 1.4.3