File/plugins/change_password/functions.php

Description

functions.php - Change Password plugin

  • version: $Id: functions.php 1254 2008-04-06 06:13:51Z tokul $
  • copyright: (c) 2003-2006 The SquirrelMail Project Team
  • copyright: (c) 2006-2008 The NaSMail Project
  • license: GNU Public License
Includes
 include_once (SM_PATH.'config/change_password_config.php') (line 44)

load site config

 include_once (SM_PATH.'plugins/change_password/config.php') (line 46)
 include_once (SM_PATH.'plugins/change_password/config_default.php') (line 19)

load default config

Constants
CPW_CURRENT_NOMATCH = _("Your current password is not correct.") (line 118)
CPW_INVALID_PW = _("Your new password contains invalid characters.") (line 119)
Functions
change_password_generic_header_do (line 404)

Blocks use of interface when passwords are expired.

  • since: 0.6
void change_password_generic_header_do ()
change_password_right_main_after_header_do (line 377)

Prints notices about aging passwords

  • since: 0.6
void change_password_right_main_after_header_do ()
change_password_webmail_top_do (line 352)

Runs password aging checks and redirects users with expired passwords to

change_password plugin page

  • since: 0.6
void change_password_webmail_top_do ()
cpw_check_input (line 57)

Will verify the input against a set of criteria: is every field supplied, does verify password match, does current password validate, ..

These criteria are (for now) backend-independent.

  • return: Array with zero or more error messages.
array cpw_check_input ()
cpw_check_pass_time (line 327)

Checks age of password hash

Function adds 'cpw_pass_age' session variable, if password age exceeds $cpw_policy_noticedays limit.

  • return: false = password is expired, true = password is not expired.
  • since: 0.6
boolean cpw_check_pass_time ()
cpw_create_salt (line 292)

Creates 8bytes random string for salting

Function is similar to OneTimePadCreate, but output is not base64_encoded.

  • since: 0.6
string cpw_create_salt ()
cpw_do_change (line 127)

Does the actual password changing (meaning it calls the hook function from the backend that does this. If something goes wrong, return error message(s). If everything ok, change the password in the session so the user doesn't have to log out, and redirect back to the options screen.

void cpw_do_change ()
cpw_policy_verify (line 250)

Runs password policy checks

  • return: false = password is expired, true = password is not expired.
  • since: 0.6
boolean cpw_policy_verify (string $current_pass)
  • string $current_pass: Current password
cpw_translate_crack_msg (line 171)

Translates PHP Crack extension messages

  • return: translated error message or original error
  • since: 0.4
string cpw_translate_crack_msg (string $err)
  • string $err: error from crack_getlastmessage()
cpw_update_pass (line 307)

Updates password information stored in preferences

  • since: 0.6
void cpw_update_pass (string $current_pass)
  • string $current_pass

Documentation generated on Sun, 22 Nov 2009 17:36:33 +0200 by phpDocumentor 1.4.3