File/plugins/change_password/backend/template.php

Description

Change password backend template

This is a template for a password changing mechanism. Currently, this contains two parts: the first is to register your function in the squirrelmail_plugin_hooks global, and the second is the function that does the actual changing.

Replace the word template everywhere with a name for your backend.

  • version: $Id: template.php 1254 2008-04-06 06:13:51Z tokul $
  • copyright: (c) 2003-2006 The SquirrelMail Project Team
  • copyright: (c) 2006-2007 The NaSMail Project
  • license: GNU Public License
Functions
cpw_template_dochange (line 77)

This is the function that is specific to your backend. It takes

the current password (as supplied by the user) and the desired new password. It will return an array of messages. If everything was successful, the array will be empty. Else, it will contain the errormessage(s). Constants to be used for these messages: CPW_CURRENT_NOMATCH -> "Your current password is not correct." CPW_INVALID_PW -> "Your new password contains invalid characters."

  • return: Array of error messages.
array cpw_template_dochange (array $data)
  • array $data: data The username/currentpw/newpw data.
cpw_template_init (line 41)

Use this function to do any backend-specific initialization, e.g. checking requirements, before the password change form is displayed to the user.

void cpw_template_init ()

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