Bug #3354 » 3354.patch
administrator/components/com_comprofiler/library/cb/cb.tables.php | ||
---|---|---|
$ui = $_CB_framework->getUi();
|
||
|
||
$user = new moscomprofilerUser( $this->_db );
|
||
|
||
$user->load( (int) $this->id );
|
||
|
||
$oldUserComplete = new moscomprofilerUser( $this->_db );
|
||
foreach ( array_keys( get_object_vars( $this ) ) as $k ) {
|
||
if ( substr( $k, 0, 1 ) != '_' ) {
|
||
$user->$k = $this->$k;
|
||
$oldUserComplete->$k = $this->$k;
|
||
}
|
||
}
|
||
|
||
// In case of Password, cleartext value for the onBefore event:
|
||
$user->$name = $this->$name;
|
||
$currentvalue = $user->$name;
|
||
if ( $name != 'password' ) {
|
||
$user->password = null;
|
||
}
|
||
|
||
if ( $name == 'password' ) {
|
||
// In case of Password, save cleartext value for the onAfter event:
|
||
$currentvalue = $user->$name;
|
||
}
|
||
|
||
if ( $ui == 1 ) {
|
||
$_PLUGINS->trigger( 'onBeforeUserUpdate', array( &$user, &$user, &$oldUserComplete, &$oldUserComplete ) );
|
||
} elseif ( $ui == 2 ) {
|
||
... | ... | |
|
||
$return = $user->store();
|
||
|
||
// In case of Password, cleartext value for the onAfter event:
|
||
$user->$name = $currentvalue;
|
||
if ( $name == 'password' ) {
|
||
// In case of Password, cleartext value for the onAfter event:
|
||
$user->$name = $currentvalue;
|
||
}
|
||
|
||
if ( $return ) {
|
||
if ( $ui == 1 ) {
|