PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

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