From 4f775fc98d0d063856c926fbfcb07f51bbb92e8a Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Mon, 28 Mar 2011 02:41:06 +1100 Subject: Allow users to change their own passwords --- inc/config.php | 2 ++ inc/mod.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/config.php b/inc/config.php index b6c33eaf..3b3f796e 100644 --- a/inc/config.php +++ b/inc/config.php @@ -321,6 +321,8 @@ $config['mod']['promoteusers'] = ADMIN; // Edit any users' login information $config['mod']['editusers'] = ADMIN; + // Change user's own password + $config['mod']['change_password'] = JANITOR; // Delete a user $config['mod']['deleteusers'] = ADMIN; // Create a user diff --git a/inc/mod.php b/inc/mod.php index 4a4de79e..3d0c0d83 100644 --- a/inc/mod.php +++ b/inc/mod.php @@ -38,7 +38,7 @@ if(!$mod) error('setCookies() was called for a non-moderator!'); // $config['cookies']['mod'] contains username:hash - setcookie($config['cookies']['mod'], $mod['username'] . ':' . $mod['hash'], time()+$config['cookies']['expire'], $config['cookies']['jail']?$config['root']:'/', null, false, true); + setcookie($config['cookies']['mod'], $mod['username'] . ':' . $mod['hash'], time()+$config['cookies']['expire'], $config['cookies']['jail']?$config['cookies']['path']:'/', null, false, true); // Put $mod in the session $_SESSION['mod'] = $mod; @@ -51,7 +51,7 @@ function destroyCookies() { global $config; // Delete the cookies - setcookie($config['cookies']['mod'], 'deleted', time()-$config['cookies']['expire'], $config['cookies']['jail']?$config['root']:'/', null, false, true); + setcookie($config['cookies']['mod'], 'deleted', time()-$config['cookies']['expire'], $config['cookies']['jail']?$config['cookies']['path']:'/', null, false, true); // Unset the session unset($_SESSION['mod']); -- cgit v1.3