Bug #3314 » 3314-pt1.patch
administrator/components/com_comprofiler/library/cb/cb.tables.php | ||
---|---|---|
}
|
||
return $result;
|
||
}
|
||
function storeDatabaseValue( $name, $value ) {
|
||
function storeDatabaseValue( $name, $value, $triggers = true ) {
|
||
global $_CB_framework, $_PLUGINS;
|
||
|
||
if ( $this->id && ( isset( $this->$name ) ) ) {
|
||
... | ... | |
$user->$name = $this->$name;
|
||
$currentvalue = $user->$name;
|
||
|
||
if ( $ui == 1 ) {
|
||
$_PLUGINS->trigger( 'onBeforeUserUpdate', array( &$user, &$user, &$oldUserComplete, &$oldUserComplete ) );
|
||
} elseif ( $ui == 2 ) {
|
||
$_PLUGINS->trigger( 'onBeforeUpdateUser', array( &$user, &$user, &$oldUserComplete ) );
|
||
if ( $triggers ) {
|
||
if ( $ui == 1 ) {
|
||
$_PLUGINS->trigger( 'onBeforeUserUpdate', array( &$user, &$user, &$oldUserComplete, &$oldUserComplete ) );
|
||
} elseif ( $ui == 2 ) {
|
||
$_PLUGINS->trigger( 'onBeforeUpdateUser', array( &$user, &$user, &$oldUserComplete ) );
|
||
}
|
||
}
|
||
|
||
// In case of Password, hashed value:
|
||
... | ... | |
// In case of Password, cleartext value for the onAfter event:
|
||
$user->$name = $currentvalue;
|
||
|
||
if ( $return ) {
|
||
if ( $ui == 1 ) {
|
||
$_PLUGINS->trigger( 'onAfterUserUpdate', array( &$user, &$user, $oldUserComplete ) );
|
||
} elseif ( $ui == 2 ) {
|
||
$_PLUGINS->trigger( 'onAfterUpdateUser', array( &$user, &$user, $oldUserComplete ) );
|
||
if ( $triggers ) {
|
||
if ( $return ) {
|
||
if ( $ui == 1 ) {
|
||
$_PLUGINS->trigger( 'onAfterUserUpdate', array( &$user, &$user, $oldUserComplete ) );
|
||
} elseif ( $ui == 2 ) {
|
||
$_PLUGINS->trigger( 'onAfterUpdateUser', array( &$user, &$user, $oldUserComplete ) );
|
||
}
|
||
}
|
||
}
|
||
unset( $user, $oldUserComplete );
|
||
... | ... | |
*
|
||
* @return boolean Store query error
|
||
*/
|
||
function storeBlock( ) {
|
||
function storeBlock( $triggers = true ) {
|
||
if ( $this->id ) {
|
||
return $this->storeDatabaseValue( 'block', (int) $this->block );
|
||
return $this->storeDatabaseValue( 'block', (int) $this->block, $triggers );
|
||
}
|
||
return false;
|
||
}
|
||
... | ... | |
*
|
||
* @return boolean Store query error
|
||
*/
|
||
function storePassword( ) {
|
||
function storePassword( $triggers = true ) {
|
||
if ( $this->id ) {
|
||
return $this->storeDatabaseValue( 'password', $this->hashAndSaltPassword( $this->password ) );
|
||
return $this->storeDatabaseValue( 'password', $this->hashAndSaltPassword( $this->password ), $triggers );
|
||
}
|
||
return false;
|
||
}
|
||
... | ... | |
*
|
||
* @return boolean Store query error
|
||
*/
|
||
function storeApproved( ) {
|
||
function storeApproved( $triggers = true ) {
|
||
if ( $this->id ) {
|
||
return $this->storeDatabaseValue( 'approved', (int) $this->approved );
|
||
return $this->storeDatabaseValue( 'approved', (int) $this->approved, $triggers );
|
||
}
|
||
return false;
|
||
}
|
||
... | ... | |
*
|
||
* @return boolean Store query error
|
||
*/
|
||
function storeConfirmed( ) {
|
||
function storeConfirmed( $triggers = true ) {
|
||
if ( $this->id ) {
|
||
return $this->storeDatabaseValue( 'confirmed', (int) $this->confirmed );
|
||
return $this->storeDatabaseValue( 'confirmed', (int) $this->confirmed, $triggers );
|
||
}
|
||
return false;
|
||
}
|