original_string: protected function notify_admins(\core\oauth2\issuer $issuer) {
          global $CFG;
          $admins = get_admins();
  
          if (empty($admins)) {
              return;
          }
          foreach ($admins as $admin) {
              $strparams = ['siteurl' => $CFG->wwwroot, 'issuer' => $issuer->get('name')];
              $long = get_string('oauthrefreshtokenexpired', 'core_admin', $strparams);
              $short = get_string('oauthrefreshtokenexpiredshort', 'core_admin', $strparams);
              $message = new \core\message\message();
              $message->courseid          = SITEID;
              $message->component         = 'moodle';
              $message->name              = 'errors';
              $message->userfrom          = core_user::get_noreply_user();
              $message->userto            = $admin;
              $message->subject           = $short;
              $message->fullmessage       = $long;
              $message->fullmessageformat = FORMAT_PLAIN;
              $message->fullmessagehtml   = $long;
              $message->smallmessage      = $short;
              $message->notification      = 1;
              message_send($message);
          }
      }
code: protected function notify_admins(\core\oauth2\issuer $issuer) {
          global $CFG;
          $admins = get_admins();
  
          if (empty($admins)) {
              return;
          }
          foreach ($admins as $admin) {
              $strparams = ['siteurl' => $CFG->wwwroot, 'issuer' => $issuer->get('name')];
              $long = get_string('oauthrefreshtokenexpired', 'core_admin', $strparams);
              $short = get_string('oauthrefreshtokenexpiredshort', 'core_admin', $strparams);
              $message = new \core\message\message();
              $message->courseid          = SITEID;
              $message->component         = 'moodle';
              $message->name              = 'errors';
              $message->userfrom          = core_user::get_noreply_user();
              $message->userto            = $admin;
              $message->subject           = $short;
              $message->fullmessage       = $long;
              $message->fullmessageformat = FORMAT_PLAIN;
              $message->fullmessagehtml   = $long;
              $message->smallmessage      = $short;
              $message->notification      = 1;
              message_send($message);
          }
      }
code_tokens: protected function notify_admins ( \ core \ oauth2 \ issuer $ issuer ) { global $ CFG ; $ admins = get_admins ( ) ; if ( empty ( $ admins ) ) { return ; } foreach ( $ admins as $ admin ) { $ strparams = [ 'siteurl' => $ CFG -> wwwroot , 'issuer' => $ issuer -> get ( 'name' ) ] ; $ long = get_string ( 'oauthrefreshtokenexpired' , 'core_admin' , $ strparams ) ; $ short = get_string ( 'oauthrefreshtokenexpiredshort' , 'core_admin' , $ strparams ) ; $ message = new \ core \ message \ message ( ) ; $ message -> courseid = SITEID ; $ message -> component = 'moodle' ; $ message -> name = 'errors' ; $ message -> userfrom = core_user :: get_noreply_user ( ) ; $ message -> userto = $ admin ; $ message -> subject = $ short ; $ message -> fullmessage = $ long ; $ message -> fullmessageformat = FORMAT_PLAIN ; $ message -> fullmessagehtml = $ long ; $ message -> smallmessage = $ short ; $ message -> notification = 1 ; message_send ( $ message ) ; } }
docstring: Notify admins when an OAuth refresh token expires. Should not happen if cron is running regularly.
  @param \core\oauth2\issuer $issuer
docstring_tokens: Notify admins when an OAuth refresh token expires . Should not happen if cron is running regularly .