Home » Authentication » Auth » Bug #3101
Wrong variable names in Auth/Container/File.php
Details
| Submitted | 2005-01-05 02:13 UTC |
|---|---|
| From | herojoker at nexgo dot de |
| Assigned | mike |
| Status | Closed |
| Package | Auth |
| PHP Version | Irrelevant |
| OS | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-01-05 02:13 UTC] herojoker at nexgo dot de
Description:
------------
In Auth/Container/File.php on line 188 in the method changePassword wrong variable names are used.
Therefore an error occurs when using this method.
Reproduce code:
---------------
The error causing method:
function changePassword($username, $password)
{
$pw_obj = &$this->_load();
if (PEAR::isError($pw_obj)) {
return false;
}
$res = $pw_obj->changePasswd($user, $pass);
if (PEAR::isError($res)) {
return false;
}
$res = $pw_obj->save();
if (PEAR::isError($res)) {
return false;
}
return true;
}
Use the following code instead:
function changePassword($username, $password)
{
$pw_obj = &$this->_load();
if (PEAR::isError($pw_obj)) {
return false;
}
$res = $pw_obj->changePasswd($username, $password);
if (PEAR::isError($res)) {
return false;
}
$res = $pw_obj->save();
if (PEAR::isError($res)) {
return false;
}
return true;
}
Expected result:
----------------
Thx for the Auth package!
Hero Wanders