[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-developers] preferences/changepassword.php
From: |
Izzy Blacklock |
Subject: |
[Phpgroupware-developers] preferences/changepassword.php |
Date: |
Thu, 10 Apr 2003 00:48:13 -0600 |
User-agent: |
KMail/1.4.3 |
ok, I'm confused. Can someone explain this code snip to me please:
--------- 8< ----------
$o_passwd = $GLOBALS['phpgw_info']['user']['passwd'];
$passwd_changed = $GLOBALS['phpgw']->auth->change_password($o_passwd,
$n_passwd);
if (! $passwd_changed)
{
// This need to be changed to show a different message based on the
result
Header('Location: ' .
$GLOBALS['phpgw']->link('/preferences/index.php','cd=38'));
}
else
{
$GLOBALS['phpgw_info']['user']['passwd'] =
$GLOBALS['phpgw']->auth->change_password($o_passwd
, $n_passwd);
$GLOBALS['hook_values']['account_id'] =
$GLOBALS['phpgw_info']['user']['account_id'];
$GLOBALS['hook_values']['old_passwd'] = $o_passwd;
$GLOBALS['hook_values']['new_passwd'] = $n_passwd;
$GLOBALS['phpgw']->hooks->process('changepassword');
------- 8< --------------
First off, what is the GLOBALS[phpgw_info] array? Is this read from the
database? How is the $GLOBALS['phpgw_info']['user']['passwd'] value being
used? Is it really needed?
Second, in the beginning of the else, should
$GLOBALS['phpgw_info']['user']['passwd'] = really need to call
change_password again or can it just take the value returned in
$passwd_changed.
I'm thinking this is a bug? I'm also thinking the patch I submitted earlier
isn't going to work if the return value is expecting to be an encrypted
password!
...Izzy
- [Phpgroupware-developers] preferences/changepassword.php,
Izzy Blacklock <=