aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2004-02-05 13:38:57 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2004-02-05 13:38:57 +0000
commit7baa9ddb897281fe23bc844c23ae47a79413c42f (patch)
tree91539643725cceec2c55d6999b6795663601521d
parentf8b89a8f94225955efc691c864f9d3ac83aadb1d (diff)
downloadforums-7baa9ddb897281fe23bc844c23ae47a79413c42f.tar
forums-7baa9ddb897281fe23bc844c23ae47a79413c42f.tar.gz
forums-7baa9ddb897281fe23bc844c23ae47a79413c42f.tar.bz2
forums-7baa9ddb897281fe23bc844c23ae47a79413c42f.tar.xz
forums-7baa9ddb897281fe23bc844c23ae47a79413c42f.zip
Force password change after defined number of days
git-svn-id: file:///svn/phpbb/trunk@4793 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/session.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 83639adafa..a2577cc417 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -575,6 +575,19 @@ class user extends session
$this->img_lang = (file_exists($phpbb_root_path . 'styles/' . $this->theme['primary']['imageset_path'] . '/imageset/' . $this->lang_name)) ? $this->lang_name : $config['default_lang'];
+ // Does the user need to change their password? If so, redirect to the
+ // ucp profile reg_details page ... of course do not redirect if we're
+ // already in the ucp
+ if (!defined('IN_ADMIN') && $config['chg_passforce'] && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400))
+ {
+ global $SID;
+
+ if (!preg_match('#' . preg_quote("ucp.$phpEx$SID") . '&i\=[a-z0-9]+?&mode\=reg_details#', $_SERVER['REQUEST_URI']))
+ {
+ redirect("ucp.$phpEx$SID&i=profile&mode=reg_details");
+ }
+ }
+
return;
}