PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » Auth » Bug #3101

Wrong variable names in Auth/Container/File.php

Details

Submitted2005-01-05 02:13 UTC
Fromherojoker at nexgo dot de
Assignedmike
StatusClosed
PackageAuth
PHP VersionIrrelevant
OSIrrelevant
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