# oid_update_user($user, $sreg);
common_set_user($user->nickname);
common_real_login(true);
+ if ($_SESSION['openid_rememberme']) {
+ common_rememberme($user);
+ }
+ unset($_SESSION['openid_rememberme']);
$this->go_home($user->nickname);
} else {
$this->save_values($display, $canonical, $sreg);
oid_set_last($display);
common_set_user($user->nickname);
common_real_login(true);
+ if ($_SESSION['openid_rememberme']) {
+ common_rememberme($user);
+ }
+ unset($_SESSION['openid_rememberme']);
common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)));
}
oid_set_last($display);
common_set_user($user->nickname);
common_real_login(true);
+ if ($_SESSION['openid_rememberme']) {
+ common_rememberme($user);
+ }
+ unset($_SESSION['openid_rememberme']);
$this->go_home($user->nickname);
}
return;
}
+ $rememberme = $this->boolean('rememberme');
+
+ common_ensure_session();
+
+ $_SESSION['openid_rememberme'] = $rememberme;
+
$result = oid_authenticate($openid_url,
'finishopenidlogin');
+
if (is_string($result)) { # error message
+ unset($_SESSION['openid_rememberme']);
$this->show_form($result, $openid_url);
}
} else {
common_input('openid_url', _('OpenID URL'),
$openid_url,
_('Your OpenID URL'));
+ common_checkbox('rememberme', _('Remember me'), false,
+ _('Automatically login in the future; ' .
+ 'not for shared computers!'));
common_submit('submit', _('Login'));
common_element_end('form');
common_show_footer();