plugins/admin/UserManager.php
changeset 205 62ee6685ad18
parent 165 d53cc29308f4
parent 194 6a4573507ff8
child 219 96524a56d475
equal deleted inserted replaced
185:90b7a52bea45 205:62ee6685ad18
     1 <?php
     1 <?php
     2 
     2 
     3 /*
     3 /*
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     5  * Version 1.1.1
     5  * Version 1.0.2 (Coblynau)
     6  * Copyright (C) 2006-2007 Dan Fuhry
     6  * Copyright (C) 2006-2007 Dan Fuhry
     7  *
     7  *
     8  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     8  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     9  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
     9  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    10  *
    10  *
    50         $db->_die();
    50         $db->_die();
    51       echo '<div class="info-box">The user account has been deleted.</div>';
    51       echo '<div class="info-box">The user account has been deleted.</div>';
    52     }
    52     }
    53     else
    53     else
    54     {
    54     {
    55       if ( $session->user_id != $user_id )
    55       if ( $session->user_id == $user_id )
       
    56       {
       
    57         $username = $session->username;
       
    58         $password = false;
       
    59         $email = $session->email;
       
    60         $real_name = $session->real_name;
       
    61       }
       
    62       else
    56       {
    63       {
    57         $username = $_POST['username'];
    64         $username = $_POST['username'];
    58         if ( !preg_match('#^'.$session->valid_username.'$#', $username) )
    65         if ( !preg_match('#^'.$session->valid_username.'$#', $username) )
    59           $errors[] = 'The username you entered contains invalid characters.';
    66           $errors[] = 'The username you entered contains invalid characters.';
    60         
    67