|
@@ -42,9 +42,9 @@ class CodeImgGenerate extends CaptchaAction
|
|
|
public function getPhrase()
|
|
|
{
|
|
|
if(!$this->verifycode){
|
|
|
- $this->verifycode = $this->generateVerifyCode();
|
|
|
- \Yii::$app->cache->set($this->getSessionKey() . '/' . $this->verifycode, $this->verifycode);
|
|
|
}
|
|
|
+ $this->verifycode = (string)rand(1234, 9999);
|
|
|
+ \Yii::$app->cache->set($this->getSessionKey() . '/' . $this->verifycode, $this->verifycode);
|
|
|
|
|
|
return $this->verifycode;
|
|
|
}
|