original_string: public static function registration_reminder($url) {
          if (defined('BEHAT_SITE_RUNNING') && BEHAT_SITE_RUNNING) {
              // No redirection during behat runs.
              return;
          }
          if (!has_capability('moodle/site:config', context_system::instance())) {
              return;
          }
          if (self::show_after_install() || self::get_new_registration_fields()) {
              $returnurl = new moodle_url($url);
              redirect(new moodle_url('/admin/registration/index.php', ['returnurl' => $returnurl->out_as_local_url(false)]));
          }
      }
code: public static function registration_reminder($url) {
          if (defined('BEHAT_SITE_RUNNING') && BEHAT_SITE_RUNNING) {
              // No redirection during behat runs.
              return;
          }
          if (!has_capability('moodle/site:config', context_system::instance())) {
              return;
          }
          if (self::show_after_install() || self::get_new_registration_fields()) {
              $returnurl = new moodle_url($url);
              redirect(new moodle_url('/admin/registration/index.php', ['returnurl' => $returnurl->out_as_local_url(false)]));
          }
      }
code_tokens: public static function registration_reminder ( $ url ) { if ( defined ( 'BEHAT_SITE_RUNNING' ) && BEHAT_SITE_RUNNING ) { // No redirection during behat runs. return ; } if ( ! has_capability ( 'moodle/site:config' , context_system :: instance ( ) ) ) { return ; } if ( self :: show_after_install ( ) || self :: get_new_registration_fields ( ) ) { $ returnurl = new moodle_url ( $ url ) ; redirect ( new moodle_url ( '/admin/registration/index.php' , [ 'returnurl' => $ returnurl -> out_as_local_url ( false ) ] ) ) ; } }
docstring: Redirect to the site registration form if it's a new install or registration needs updating
  
  @param string|moodle_url $url
docstring_tokens: Redirect to the site registration form if it s a new install or registration needs updating