Project

General

Profile

Bug #3196 » 3196-p3.patch

krileon, 30 January 2012 20:24

View differences:

/administrator/components/com_comprofiler/controller/controller.default.php
if( isset( $ueConfig['emailpass'] ) && ( $ueConfig['emailpass'] == "1" ) && ( $row->approved == 0 ) ) {
// if we need to generate a random password to be emailed with confirmation, set new random password only at first approval:
$row->setRandomPassword();
$pwd = $row->hashAndSaltPassword( $row->password );
$_CB_database->setQuery( "UPDATE #__users SET password=" . $_CB_database->Quote( $pwd ) . " WHERE id = " . (int) $row->id );
$_CB_database->query();
$row->storePassword();
//createEmail($row, 'welcome', $ueConfig,null,1);
}
if ($row->approved == 0 && $approved == 1 && $row->confirmed == 1 ) {
......
case 'block':
case 'unblock':
$_PLUGINS->trigger( 'onBeforeUserBlocking', array( $row, $actionValue ) );
$_CB_database->setQuery( "UPDATE #__users SET block = " . (int) $actionValue . " WHERE id = " . (int) $row->id );
if ($_CB_database->query()) {
$row->block = $actionValue;
if ($row->storeBlock()) {
// if action is to block a user, delete user acounts active sessions
if ( $actionValue == 1 ) {
$query = "DELETE FROM #__session"
(3-3/6)