# 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. --- administrator/components/com_comprofiler/library/cb/cb.tables.php +++ administrator/components/com_comprofiler/library/cb/cb.tables.php @@ -1251,20 +1251,23 @@ $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 ) { @@ -1276,8 +1279,10 @@ $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 ) {