Project

General

Profile

Bug #3341 » 3341-pt2.patch

krileon, 10 April 2012 17:17

View differences:

components/com_comprofiler/comprofiler.php
$user = CBuser::getUserDataInstance( (int) $user_id );
$user->password = $newpass;
if ( ! $user->storePassword() ) {
if ( ! $user->storePassword( false ) ) {
die("SQL error" . $user->getError());
}
cbRedirect( cbSef("index.php?option=$option&task=done".($Itemid ? "&Itemid=". (int) $Itemid : ""), false ), sprintf( _UE_NEWPASS_SENT, htmlspecialchars( $confirmEmail ) ) );
......
return;
}
$user->approved = 1;
$user->storeApproved();
$user->storeApproved( false );
if ( $ueConfig['emailpass'] == "1" ) {
$user->storePassword();
$user->storePassword( false );
}
$_PLUGINS->trigger( 'onAfterUserApproval', array( $user, true, true ) );
activateUser($user, 1, "UserApproval", false);
(2-2/7)