mirror of
				https://github.com/elyby/accounts.git
				synced 2025-05-31 14:11:46 +05:30 
			
		
		
		
	Образован trait AccountFinder для поиска пользователя по его нику\мылу
Модель EmailActivation теперь умеет автоматически создавать своих правильных потомков по соответствующему типу Добавлена форма восстановления пароля и её обработчик (без контроллера)
This commit is contained in:
		@@ -1,15 +1,27 @@
 | 
			
		||||
<?php
 | 
			
		||||
return [
 | 
			
		||||
    [
 | 
			
		||||
    'freshRegistrationConfirmation' => [
 | 
			
		||||
        'key' => 'HABGCABHJ1234HBHVD',
 | 
			
		||||
        'account_id' => 3,
 | 
			
		||||
        'type' => \common\models\EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION,
 | 
			
		||||
        'created_at' => time(),
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
    'oldRegistrationConfirmation' => [
 | 
			
		||||
        'key' => 'H23HBDCHHAG2HGHGHS',
 | 
			
		||||
        'account_id' => 4,
 | 
			
		||||
        'type' => \common\models\EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION,
 | 
			
		||||
        'created_at' => time() - \api\models\RepeatAccountActivationForm::REPEAT_FREQUENCY - 10,
 | 
			
		||||
        'created_at' => time() - (new \common\models\confirmations\RegistrationConfirmation())->repeatTimeout - 10,
 | 
			
		||||
    ],
 | 
			
		||||
    'freshPasswordRecovery' => [
 | 
			
		||||
        'key' => 'H24HBDCHHAG2HGHGHS',
 | 
			
		||||
        'account_id' => 5,
 | 
			
		||||
        'type' => \common\models\EmailActivation::TYPE_FORGOT_PASSWORD_KEY,
 | 
			
		||||
        'created_at' => time(),
 | 
			
		||||
    ],
 | 
			
		||||
    'oldPasswordRecovery' => [
 | 
			
		||||
        'key' => 'H25HBDCHHAG2HGHGHS',
 | 
			
		||||
        'account_id' => 6,
 | 
			
		||||
        'type' => \common\models\EmailActivation::TYPE_FORGOT_PASSWORD_KEY,
 | 
			
		||||
        'created_at' => time() - (new \common\models\confirmations\RecoverPassword())->repeatTimeout - 10,
 | 
			
		||||
    ],
 | 
			
		||||
];
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user