19 defined(
'XOOPS_ROOT_PATH') or die('Restricted access');
31 $myts =& MyTextsanitizer::getInstance();
33 include_once
$GLOBALS[
'xoops']->path(
'class/auth/authfactory.php');
41 if (0 ==
$user->getVar(
'level')) {
47 foreach (
$user->getGroups() as $group) {
48 if (in_array($group,
$xoopsConfig[
'closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) {
58 $user->setVar(
'last_login', time());
62 $GLOBALS[
"sess_handler"]->regenerate_id(
true);
66 $user_theme =
$user->getVar(
'theme');
67 if (in_array($user_theme,
$xoopsConfig[
'theme_set_allowed'])) {
68 $_SESSION[
'xoopsUserTheme'] = $user_theme;
73 if (!empty(
$_POST[
"rememberme"])) {
80 if (!empty(
$_POST[
'xoops_redirect']) && !strpos(
$_POST[
'xoops_redirect'],
'register')) {
81 $xoops_redirect = trim(rawurldecode(
$_POST[
'xoops_redirect']));
82 $parsed = parse_url(XOOPS_URL);
83 $url = isset($parsed[
'scheme']) ? $parsed[
'scheme'].
'://' :
'http://';
84 if (isset( $parsed[
'host'])) {
85 $url .= $parsed[
'host'];
86 if (isset( $parsed[
'port'])) {
87 $url .=
':' . $parsed[
'port'];
92 if (@$parsed[
'path']) {
93 if (strncmp($parsed[
'path'], $xoops_redirect, strlen( $parsed[
'path']))) {
94 $url .= $parsed[
'path'];
97 $url .= $xoops_redirect;
99 $url = XOOPS_URL .
'/index.php';
108 }
else if (empty(
$_POST[
'xoops_redirect'])) {