# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: Joomla root # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. --- /components/com_comprofiler/comprofiler.php +++ /components/com_comprofiler/comprofiler.php @@ -919,13 +919,10 @@ if ($res) { $_PLUGINS->trigger( 'onNewPassword', array($user_id,$newpass)); - $cbUser = CBuser::getInstance( (int) $user_id ); - $user = $cbUser->getUserData(); - $newpass = $user->hashAndSaltPassword( $newpass ); - $sql = "UPDATE #__users SET password = " . $_CB_database->Quote( $newpass ) . " WHERE id = " . (int) $user_id; - $_CB_database->setQuery( $sql ); - if (!$_CB_database->query()) { - die("SQL error" . $_CB_database->stderr(true)); + $user = CBuser::getUserDataInstance( (int) $user_id ); + $user->password = $user->hashAndSaltPassword( $newpass ); + if (!$user->storePassword()) { + die("SQL error" . $user->getError()); } cbRedirect( cbSef("index.php?option=$option&task=done".($Itemid ? "&Itemid=". (int) $Itemid : ""), false ), sprintf( _UE_NEWPASS_SENT, htmlspecialchars( $confirmEmail ) ) ); } else {