ilForumAuthorInformationCache  
 More...
◆ getUserObjectById()
  
  
      
        
          | static ilForumAuthorInformationCache::getUserObjectById  | 
          ( | 
          int  | 
          $usr_id | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ preloadUserObjects()
  
  
      
        
          | static ilForumAuthorInformationCache::preloadUserObjects  | 
          ( | 
          array  | 
          $usr_ids | ) | 
           | 
         
       
   | 
  
static   | 
  
 
- Parameters
 - 
  
  
 
Definition at line 39 of file class.ilForumAuthorInformationCache.php.
References $DIC, $ilDB, $res, and ILIAS\Repository\int().
Referenced by ilForumThreadObjectTableGUI\__construct(), ilForumTopic\getNestedSetPostChildren(), ilForumTopic\getPostTree(), ilForumTopicTableGUI\initMergeThreadsTable(), and ilForumCronNotification\sendCronForumNotification().
   42         $ilDB = $DIC->database();
    44         $usr_ids_to_request = array_diff($usr_ids, self::$requested_usr_ids);
    45         self::$requested_usr_ids = array_merge(self::$requested_usr_ids, $usr_ids_to_request);
    46         self::$requested_usr_ids_key_map = array_flip(self::$requested_usr_ids);
    48         if ($usr_ids_to_request !== []) {
    49             $in = 
$ilDB->in(
'ud.usr_id', $usr_ids_to_request, 
false, 
'integer');
    51                                 SELECT ud.usr_id, od.create_date, login, firstname, lastname, ud.title, gender, pprof.value public_profile, pgen.value public_gender, pup.value public_upload    53                                 INNER JOIN object_data od ON od.obj_id = ud.usr_id    54                                 LEFT JOIN usr_pref pprof ON pprof.usr_id = ud.usr_id AND pprof.keyword = %s    55                                 LEFT JOIN usr_pref pgen ON pgen.usr_id = ud.usr_id AND pgen.keyword = %s    56                                 LEFT JOIN usr_pref pup ON pup.usr_id = ud.usr_id AND pup.keyword = %s    62                 [
'text', 
'text', 
'text'],
    63                 [
'public_profile', 
'public_gender', 
'public_upload']
    68                 $user->setId((
int) $row[
'usr_id']);
    69                 $user->setLogin($row[
'login']);
    70                 $user->setGender($row[
'gender'] ?? 
'');
    71                 $user->setUTitle($row[
'title'] ?? 
'');
    72                 $user->setFirstname($row[
'firstname'] ?? 
'');
    73                 $user->setLastname($row[
'lastname'] ?? 
'');
    74                 $user->setPref(
'public_profile', $row[
'public_profile']);
    75                 $user->setPref(
'public_gender', $row[
'public_gender']);
    76                 $user->setPref(
'public_upload', $row[
'public_upload']);
    78                 self::$user_instances[(
int) $row[
'usr_id']] = $user;
 
 
 
 
◆ $requested_usr_ids
  
  
      
        
          | array ilForumAuthorInformationCache::$requested_usr_ids = [] | 
         
       
   | 
  
staticprotected   | 
  
 
 
◆ $requested_usr_ids_key_map
  
  
      
        
          | array ilForumAuthorInformationCache::$requested_usr_ids_key_map = [] | 
         
       
   | 
  
staticprotected   | 
  
 
 
◆ $user_instances
  
  
      
        
          | array ilForumAuthorInformationCache::$user_instances = [] | 
         
       
   | 
  
staticprotected   | 
  
 
 
The documentation for this class was generated from the following file: