plugins/SpecialUserPrefs.php
changeset 304 e2cb5f1432c8
parent 286 b2f985e4cef3
child 315 f49e3c8b638c
equal deleted inserted replaced
280:dc08c70ca550 304:e2cb5f1432c8
    23 $userprefs_menu = Array();
    23 $userprefs_menu = Array();
    24 $userprefs_menu_links = Array();
    24 $userprefs_menu_links = Array();
    25 function userprefs_menu_add($section, $text, $link)
    25 function userprefs_menu_add($section, $text, $link)
    26 {
    26 {
    27   global $userprefs_menu;
    27   global $userprefs_menu;
    28   if ( is_array($userprefs_menu[$section]) )
    28   if ( isset($userprefs_menu[$section]) && is_array($userprefs_menu[$section]) )
    29   {
    29   {
    30     $userprefs_menu[$section][] = Array(
    30     $userprefs_menu[$section][] = Array(
    31       'text' => $text,
    31       'text' => $text,
    32       'link' => $link
    32       'link' => $link
    33       );
    33       );
   131   
   131   
   132   // User ID - later this will be specified on the URL, but hardcoded for now
   132   // User ID - later this will be specified on the URL, but hardcoded for now
   133   $uid = intval($session->user_id);
   133   $uid = intval($session->user_id);
   134   
   134   
   135   // Instanciate the AES encryptor
   135   // Instanciate the AES encryptor
   136   $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE);
   136   $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
   137   
   137   
   138   // Basic user info
   138   // Basic user info
   139   $q = $db->sql_query('SELECT username, password, email, real_name, signature, theme, style FROM '.table_prefix.'users WHERE user_id='.$uid.';');
   139   $q = $db->sql_query('SELECT username, password, email, real_name, signature, theme, style FROM '.table_prefix.'users WHERE user_id='.$uid.';');
   140   if ( !$q )
   140   if ( !$q )
   141     $db->_die();
   141     $db->_die();