Esempio n. 1
0
 public function actionResetPayPassDoPost()
 {
     $request = wanhunet::$app->request;
     $member = wanhunet::app()->member;
     if ($request->isPost) {
         if ($request->post('newpass') !== $request->post('renewpass')) {
             return $this->goBack(['info' => '两次输入的密码不同'], Url::to(['site/reset-pay-pass-do']));
         }
         $phone = $member->phone;
         $vcode = VerificationCode::findByField($phone);
         $vcode->field = $phone;
         if ($vcode->verify($request->post('captcha'))) {
             $vcode->verifySave();
             $member->savePayPass($request->post('newpass'));
             return $this->goBack(['info' => '修改成功'], Url::to(['site/setup']));
         } else {
             return $this->goBack(['info' => '验证码错误', 'email' => $phone], Url::to(['site/reset-pay-pass-do']));
         }
     }
     return false;
 }
Esempio n. 2
0
 public function actionEmail()
 {
     return VerificationCode::find()->where(['type' => VerificationCode::TYPE_EMAIL])->all();
 }
Esempio n. 3
0
<?php

use modules\asset\behaviors\ExperienceMoney;
return ['adminEmail' => '*****@*****.**', 'behaviors' => [\modules\member\models\VerificationCode::className() => ['assetExperienceMoney' => ['class' => ExperienceMoney::className()]], \modules\member\models\Member::className() => ['asset' => ['class' => \modules\asset\behaviors\Asset::className(), 'assetConfig' => \modules\asset\models\Asset::className()], 'assetExperienceMoney' => ['class' => ExperienceMoney::className()]], \modules\asset\models\Asset::className() => ['asset_log' => ['class' => \modules\asset\behaviors\Log::className()], 'assetExperienceMoney' => ['class' => ExperienceMoney::className()]], \modules\invest\models\InvestList::className() => ['payedFinish' => \modules\invest\behaviors\InvestListPayed::className()], \modules\asset\models\AssetMoney::className() => [\modules\asset\behaviors\Log::className()], \modules\member\models\MemberOther::className() => [ExperienceMoney::className()]], 'events' => [\modules\asset\behaviors\Asset::className() => [\modules\member\models\Member::EVENT_AFTER_INSERT => \modules\asset\behaviors\Asset::FUNCTION_MEMBER_AFTER_INSERT], \modules\asset\behaviors\ExperienceMoney::className() => [\modules\member\models\VerificationCode::EVENT_VERIFY_SUCCESS_EMAIL => ExperienceMoney::FUNCTION_INC_EMAIL, \modules\member\models\VerificationCode::EVENT_VERIFY_SUCCESS_PHONE => ExperienceMoney::FUNCTION_INC_PHONE, \modules\asset\models\AssetMoney::EVENT_FINISH_PAY => ExperienceMoney::FUNCTION_INC_FIRST_MONEY, \modules\member\models\Member::EVENT_BEFORE_SAVE_IDCARD => ExperienceMoney::FUNCTION_INC_FIRST_IDCARD, \modules\member\models\MemberOther::EVENT_AFTER_INSERT => ExperienceMoney::FUNCTION_INT_BANGDING], \modules\invest\behaviors\InvestListPayed::className() => [\modules\invest\models\InvestList::EVENT_BEFORE_FINISH_PAY => \modules\invest\behaviors\InvestListPayed::FUNCTION_SET_INTEREST, \modules\invest\models\InvestList::EVENT_AFTER_FINISH_PAY => \modules\invest\behaviors\InvestListPayed::FUNCTION_SET_INTEREST_M], \modules\asset\behaviors\Log::className() => [\modules\asset\models\AssetMoney::EVENT_BEFORE_INSERT => \modules\asset\behaviors\Log::FUNCTION_BEFORE_INSERT]]];