original_string: public function actionActivate($token)
      {
          if ($this->module->userComponent !== true) {
              $this->info(Yii::t('podium/flash', 'Please contact the administrator to activate your account.'));
              return $this->module->goPodium();
          }
  
          $model = User::findByActivationToken($token);
          if (!$model) {
              $this->error(Yii::t('podium/flash', 'The provided activation token is invalid or expired.'));
              return $this->module->goPodium();
          }
          $model->scenario = 'token';
          if ($model->activate()) {
              PodiumCache::clearAfter('activate');
              Log::info('Account activated', $model->id, __METHOD__);
              $this->success(Yii::t('podium/flash', 'Your account has been activated. You can sign in now.'));
          } else {
              Log::error('Error while activating account', $model->id, __METHOD__);
              $this->error(Yii::t('podium/flash', 'Sorry! There was some error while activating your account. Contact administrator about this problem.'));
          }
          return $this->module->goPodium();
      }
code: public function actionActivate($token)
      {
          if ($this->module->userComponent !== true) {
              $this->info(Yii::t('podium/flash', 'Please contact the administrator to activate your account.'));
              return $this->module->goPodium();
          }
  
          $model = User::findByActivationToken($token);
          if (!$model) {
              $this->error(Yii::t('podium/flash', 'The provided activation token is invalid or expired.'));
              return $this->module->goPodium();
          }
          $model->scenario = 'token';
          if ($model->activate()) {
              PodiumCache::clearAfter('activate');
              Log::info('Account activated', $model->id, __METHOD__);
              $this->success(Yii::t('podium/flash', 'Your account has been activated. You can sign in now.'));
          } else {
              Log::error('Error while activating account', $model->id, __METHOD__);
              $this->error(Yii::t('podium/flash', 'Sorry! There was some error while activating your account. Contact administrator about this problem.'));
          }
          return $this->module->goPodium();
      }
code_tokens: public function actionActivate ( $ token ) { if ( $ this -> module -> userComponent !== true ) { $ this -> info ( Yii :: t ( 'podium/flash' , 'Please contact the administrator to activate your account.' ) ) ; return $ this -> module -> goPodium ( ) ; } $ model = User :: findByActivationToken ( $ token ) ; if ( ! $ model ) { $ this -> error ( Yii :: t ( 'podium/flash' , 'The provided activation token is invalid or expired.' ) ) ; return $ this -> module -> goPodium ( ) ; } $ model -> scenario = 'token' ; if ( $ model -> activate ( ) ) { PodiumCache :: clearAfter ( 'activate' ) ; Log :: info ( 'Account activated' , $ model -> id , __METHOD__ ) ; $ this -> success ( Yii :: t ( 'podium/flash' , 'Your account has been activated. You can sign in now.' ) ) ; } else { Log :: error ( 'Error while activating account' , $ model -> id , __METHOD__ ) ; $ this -> error ( Yii :: t ( 'podium/flash' , 'Sorry! There was some error while activating your account. Contact administrator about this problem.' ) ) ; } return $ this -> module -> goPodium ( ) ; }
docstring: Activating the account based on the provided activation token.
  @param string $token
  @return Response
docstring_tokens: Activating the account based on the provided activation token .