original_string: public static function get_site_dpos() {
          // Get role(s) that can manage data requests.
          $dporoles = self::get_assigned_privacy_officer_roles();
  
          $dpos = [];
          $context = context_system::instance();
          foreach ($dporoles as $roleid) {
              $allnames = get_all_user_name_fields(true, 'u');
              $fields = 'u.id, u.confirmed, u.username, '. $allnames . ', ' .
                        'u.maildisplay, u.mailformat, u.maildigest, u.email, u.emailstop, u.city, '.
                        'u.country, u.picture, u.idnumber, u.department, u.institution, '.
                        'u.lang, u.timezone, u.lastaccess, u.mnethostid, u.auth, u.suspended, u.deleted, ' .
                        'r.name AS rolename, r.sortorder, '.
                        'r.shortname AS roleshortname, rn.name AS rolecoursealias';
              // Fetch users that can manage data requests.
              $dpos += get_role_users($roleid, $context, false, $fields);
          }
  
          // If the site has no data protection officer, defer to site admin(s).
          if (empty($dpos)) {
              $dpos = get_admins();
          }
          return $dpos;
      }
code: public static function get_site_dpos() {
          // Get role(s) that can manage data requests.
          $dporoles = self::get_assigned_privacy_officer_roles();
  
          $dpos = [];
          $context = context_system::instance();
          foreach ($dporoles as $roleid) {
              $allnames = get_all_user_name_fields(true, 'u');
              $fields = 'u.id, u.confirmed, u.username, '. $allnames . ', ' .
                        'u.maildisplay, u.mailformat, u.maildigest, u.email, u.emailstop, u.city, '.
                        'u.country, u.picture, u.idnumber, u.department, u.institution, '.
                        'u.lang, u.timezone, u.lastaccess, u.mnethostid, u.auth, u.suspended, u.deleted, ' .
                        'r.name AS rolename, r.sortorder, '.
                        'r.shortname AS roleshortname, rn.name AS rolecoursealias';
              // Fetch users that can manage data requests.
              $dpos += get_role_users($roleid, $context, false, $fields);
          }
  
          // If the site has no data protection officer, defer to site admin(s).
          if (empty($dpos)) {
              $dpos = get_admins();
          }
          return $dpos;
      }
code_tokens: public static function get_site_dpos ( ) { // Get role(s) that can manage data requests. $ dporoles = self :: get_assigned_privacy_officer_roles ( ) ; $ dpos = [ ] ; $ context = context_system :: instance ( ) ; foreach ( $ dporoles as $ roleid ) { $ allnames = get_all_user_name_fields ( true , 'u' ) ; $ fields = 'u.id, u.confirmed, u.username, ' . $ allnames . ', ' . 'u.maildisplay, u.mailformat, u.maildigest, u.email, u.emailstop, u.city, ' . 'u.country, u.picture, u.idnumber, u.department, u.institution, ' . 'u.lang, u.timezone, u.lastaccess, u.mnethostid, u.auth, u.suspended, u.deleted, ' . 'r.name AS rolename, r.sortorder, ' . 'r.shortname AS roleshortname, rn.name AS rolecoursealias' ; // Fetch users that can manage data requests. $ dpos += get_role_users ( $ roleid , $ context , false , $ fields ) ; } // If the site has no data protection officer, defer to site admin(s). if ( empty ( $ dpos ) ) { $ dpos = get_admins ( ) ; } return $ dpos ; }
docstring: Fetches the list of users with the Privacy Officer role.
docstring_tokens: Fetches the list of users with the Privacy Officer role .