Index: trunk/core/units/users/users_event_handler.php =================================================================== diff -u -N -r6625 -r6791 --- trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 6625) +++ trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 6791) @@ -357,7 +357,7 @@ $object =& $event->getObject(); $this->Application->SetVar('u_id', $object->GetID() ); - if($object->GetDBField('Status') == STATUS_ACTIVE) + if($object->GetDBField('Status') == STATUS_ACTIVE && !$this->Application->ConfigValue('User_Password_Auto')) { $email_as_login = $this->Application->ConfigValue('Email_As_Login'); list($login_field, $submit_field) = $email_as_login ? Array('Email', 'email') : Array('Login', 'login'); @@ -448,9 +448,15 @@ $cs_helper =& $this->Application->recallObject('CountryStatesHelper'); $cs_helper->CheckStateField($event, 'State', 'Country'); + $object =& $event->getObject( Array('skip_autoload' => true) ); + if ($this->Application->ConfigValue('User_Password_Auto')) { + $pass = makepassword4(rand(5,8)); + $object->SetField('Password', $pass); + $object->SetField('VerifyPassword', $pass); + $this->Application->SetVar('user_password',$pass); + } parent::OnCreate($event); - $object =& $event->getObject( Array('skip_autoload' => true) ); $this->Application->SetVar('u_id', $object->getID() );