m\modules\v1\controllers\DefaultController::_sendMsg PHP Method

_sendMsg() protected method

protected _sendMsg ( $mobile )
    protected function _sendMsg($mobile)
    {
        $session = Yii::$app->session;
        $session->open();
        $verifyCode = (string) mt_rand(100000, 999999);
        $sent = Yii::$app->smser->send($mobile, "亲爱的用户,您的验证码是{$verifyCode},请于10分钟内使用。如非本人操作,请忽略该短信。");
        if ($sent) {
            $session['mobileSignupNext'] = time() + 60;
            $session['mobileSignupVerifyCode'] = $verifyCode;
        }
        return $sent;
    }