Project

General

Profile

Bug #2256 ยป 2256.patch

krileon, 01 February 2011 20:34

View differences:

components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php
* @param string $reason 'edit' for save profile edit, 'register' for registration, 'search' for searches
*/
function prepareFieldDataSave( &$field, &$user, &$postdata, $reason ) {
global $ueConfig;
global $_CB_framework, $ueConfig;
$this->_prepareFieldMetaSave( $field, $user, $postdata, $reason );
// For CB main password don't save if it's on registration and passwords are auto-generated.
if ( ( $reason == 'register' ) && ( $field->name == 'password' ) ) {
if ( ( ( $reason == 'register' ) || ( ( $_CB_framework->getUi() == 2 ) && ( ! $user->id ) ) ) && ( $field->name == 'password' ) ) {
if ( isset( $ueConfig['emailpass'] ) && ( $ueConfig['emailpass'] == "1" ) ) {
return;
}
    (1-1/1)