Index: branches/unlabeled/unlabeled-1.68.2/core/units/users/users_event_handler.php =================================================================== diff -u -r6923 -r7062 --- branches/unlabeled/unlabeled-1.68.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 6923) +++ branches/unlabeled/unlabeled-1.68.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 7062) @@ -120,6 +120,11 @@ list($login_field, $submit_field) = $email_as_login && !$this->Application->IsAdmin() ? Array('Email', 'email') : Array('Login', 'login'); $login_value = $this->Application->GetVar($submit_field); + // process "Save Username" checkbox + $save_username = $this->Application->GetVar('cb_save_username') ? $login_value : ''; + setcookie('save_username', $save_username); + $this->Application->SetVar('save_username', $save_username); // cookie will be set on next refresh, but refresh won't occur if login error present, so duplicate cookie in HTTPQuery + if ($this->Application->IsAdmin() && ($login_value == 'root')) { // logging in "root" (admin only) $root_password = $this->Application->ConfigValue('RootPass'); Index: branches/unlabeled/unlabeled-1.14.2/core/units/users/users_tag_processor.php =================================================================== diff -u -r6842 -r7062 --- branches/unlabeled/unlabeled-1.14.2/core/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 6842) +++ branches/unlabeled/unlabeled-1.14.2/core/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 7062) @@ -176,6 +176,16 @@ $object =& $this->getObject($params); return $object->GetID() != -1 ? $object->GetDBField('Login') : 'root'; } + + function CookieUsername($params) + { + $submit_value = $this->Application->GetVar($params['submit_field']); + if ($submit_value !== false) { + return $submit_value; + } + + return $this->Application->GetVar('save_username'); // from cookie + } }