$nickname = $this->arg('nickname');
$password = $this->arg('password');
if (common_check_user($nickname, $password)) {
- common_set_user($nickname);
+ # success!
+ if (!common_set_user($nickname)) {
+ common_server_error(_t('Error setting user.'));
+ return;
+ }
+ # success!
common_redirect(common_local_url('all',
array('nickname' =>
$nickname)));
} else if ($password != $confirm) {
$this->show_form(_t('Passwords don\'t match.'));
} else if ($this->register_user($nickname, $password, $email)) {
- common_set_user($nickname);
+ # success!
+ if (!common_set_user($nickname)) {
+ common_server_error(_t('Error setting user.'));
+ return;
+ }
common_redirect(common_local_url('profilesettings'));
} else {
$this->show_form(_t('Invalid username or password.'));