Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
user_umod.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5  * @package FDL
6 */
7 /**
8  * Generated Header (not documented yet)
9  *
10  * @author Anakeen 2000
11  * @version $Id: user_umod.php,v 1.2 2003/08/18 15:46:41 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage USERS
15  */
16 /**
17  */
18 // ---------------------------------------------------------------
19 // $Id: user_umod.php,v 1.2 2003/08/18 15:46:41 eric Exp $
20 // $Source: /home/cvsroot/anakeen/freedom/core/Action/Users/user_umod.php,v $
21 // ---------------------------------------------------------------
22 include_once ("Class.SubForm.php");
23 include_once ("Class.User.php");
24 // -----------------------------------
25 function user_umod(&$action)
26 {
27  // -----------------------------------
28  // Get all the params
29  $id = $action->user->id; // himself
30  $user = $action->user;
31 
32  if ($id == 0) $action->exitError(_("the user identification is unknow"));
33 
34  $papp = GetHttpVars("papp", "APPMNG");
35  $paction = GetHttpVars("paction", "PARAM_CUACCOUNT");
36  $pargs = GetHttpVars("pargs", "");
37 
38  $user->firstname = GetHttpVars("firstname");
39  $user->lastname = GetHttpVars("lastname");
40 
41  if (GetHttpVars("passwd") != "") {
42  $user->password_new = GetHttpVars("passwd");
43  $user->expires = 0; // means recompute expire date if needed
44 
45  }
46  $user->Modify();
47 
48  redirect($action, $papp, $paction);
49 }
50 ?>
← centre documentaire © anakeen - published under CC License - Dynacase