includes/sessions.php
changeset 1089 16a1e8626dd9
parent 1084 742cb0f10766
child 1101 30d8bb88572d
equal deleted inserted replaced
1088:3b25a59dacd1 1089:16a1e8626dd9
   833       if((int)$level > (int)$row['user_level'])
   833       if((int)$level > (int)$row['user_level'])
   834         return array(
   834         return array(
   835           'success' => false,
   835           'success' => false,
   836           'error' => 'too_big_for_britches'
   836           'error' => 'too_big_for_britches'
   837         );
   837         );
       
   838       
       
   839       // grant session
   838       $sess = $this->register_session($row['user_id'], $username, ( isset($password_hmac) ? $password_hmac : $password ), $level, $remember);
   840       $sess = $this->register_session($row['user_id'], $username, ( isset($password_hmac) ? $password_hmac : $password ), $level, $remember);
       
   841       
   839       if($sess)
   842       if($sess)
   840       {
   843       {
   841         if($level > USER_LEVEL_MEMBER)
   844         if($level > USER_LEVEL_MEMBER)
   842           $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'admin_auth_good\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', ' . intval($level) . ')');
   845           $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'admin_auth_good\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', ' . intval($level) . ')');
   843         else
   846         else