Moderators: jmacgreg, michael, jheckman, barbarah, btbell, bdgregg, asmecher
$user = Validation::login(Request::getUserVar('username'), Request::getUserVar('password'), $reason, Request::getUserVar('remember') == null ? false : true);
if ($user !== false) {
if ($user->getMustChangePassword()) {
// User must change their password in order to log in
Validation::logout();
PKPRequest::redirect(null, null, 'changePassword', $user->getUsername());
} else {
$source = Request::getUserVar('source');
$redirectNonSsl = Config::getVar('security', 'force_login_ssl') && !Config::getVar('security', 'force_ssl');
if (isset($source) && !empty($source)) {
PKPRequest::redirectUrl(
($redirectNonSsl?'http':Request::getProtocol()) . '://' . Request::getServerHost() . $source,
false
);
} elseif ($redirectNonSsl) {
PKPRequest::redirectNonSSL();
} else {
Request::redirectHome();
}
}
Return to OJS Technical Support
Users browsing this forum: Bing [Bot], Yahoo [Bot] and 2 guests