includes/sessions.php
changeset 221 e5302cb1945c
parent 209 8a00247d1dee
child 227 0eca1498a77b
equal deleted inserted replaced
220:d44492e34ab3 221:e5302cb1945c
  1322     $ou = $this->username;
  1322     $ou = $this->username;
  1323     $oid = $this->user_id;
  1323     $oid = $this->user_id;
  1324     if($level > USER_LEVEL_CHPREF)
  1324     if($level > USER_LEVEL_CHPREF)
  1325     {
  1325     {
  1326       $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE);
  1326       $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE);
  1327       if(!$this->user_logged_in || $this->auth_level < USER_LEVEL_MOD) return 'success';
  1327       if(!$this->user_logged_in || $this->auth_level < USER_LEVEL_MOD)
       
  1328       {
       
  1329         return 'success';
       
  1330       }
  1328       // Destroy elevated privileges
  1331       // Destroy elevated privileges
  1329       $keyhash = md5(strrev($this->sid_super));
  1332       $keyhash = md5(strrev($this->sid_super));
  1330       $this->sql('DELETE FROM '.table_prefix.'session_keys WHERE session_key=\''.$keyhash.'\' AND user_id=\'' . $this->user_id . '\';');
  1333       $this->sql('DELETE FROM '.table_prefix.'session_keys WHERE session_key=\''.$keyhash.'\' AND user_id=\'' . $this->user_id . '\';');
  1331       $this->sid_super = false;
  1334       $this->sid_super = false;
  1332       $this->auth_level = USER_LEVEL_MEMBER;
  1335       $this->auth_level = USER_LEVEL_MEMBER;