original_string: public function checkAccess()
      {
          if (YII_ENV === 'test') {
              return true;
          }
          $ip = Yii::$app->request->getUserIP();
          foreach ($this->module->allowedIPs as $filter) {
              if ($filter === '*' || $filter === $ip || (($pos = strpos($filter, '*')) !== false && !strncmp($ip, $filter, $pos))) {
                  return true;
              }
          }
          echo Yii::t('podium/view', 'Access to Podium installation is denied due to IP address restriction.');
          Yii::warning('Access to Podium installation is denied due to IP address restriction. The requested IP is ' . $ip, __METHOD__);
          return false;
      }
code: public function checkAccess()
      {
          if (YII_ENV === 'test') {
              return true;
          }
          $ip = Yii::$app->request->getUserIP();
          foreach ($this->module->allowedIPs as $filter) {
              if ($filter === '*' || $filter === $ip || (($pos = strpos($filter, '*')) !== false && !strncmp($ip, $filter, $pos))) {
                  return true;
              }
          }
          echo Yii::t('podium/view', 'Access to Podium installation is denied due to IP address restriction.');
          Yii::warning('Access to Podium installation is denied due to IP address restriction. The requested IP is ' . $ip, __METHOD__);
          return false;
      }
code_tokens: public function checkAccess ( ) { if ( YII_ENV === 'test' ) { return true ; } $ ip = Yii :: $ app -> request -> getUserIP ( ) ; foreach ( $ this -> module -> allowedIPs as $ filter ) { if ( $ filter === '*' || $ filter === $ ip || ( ( $ pos = strpos ( $ filter , '*' ) ) !== false && ! strncmp ( $ ip , $ filter , $ pos ) ) ) { return true ; } } echo Yii :: t ( 'podium/view' , 'Access to Podium installation is denied due to IP address restriction.' ) ; Yii :: warning ( 'Access to Podium installation is denied due to IP address restriction. The requested IP is ' . $ ip , __METHOD__ ) ; return false ; }
docstring: Checks if user's IP is on the allowed list.
  @see Podium::$allowedIPs
  This method is copied from yii2-gii module.
  @author Qiang Xue <qiang.xue@gmail.com>
  @return bool
docstring_tokens: Checks if user s IP is on the allowed list .