forked from leftypol/leftypol
Allow users to change their own passwords
This commit is contained in:
parent
f7313d4a0e
commit
4f775fc98d
3 changed files with 34 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue