#458 fixes on tests, validator and model/user
This commit is contained in:
@ -252,7 +252,7 @@ class User extends ActiveRecord implements IdentityInterface
|
||||
'twoFactorSecretLength' => ['auth_tf_key', 'string', 'max' => 16],
|
||||
'twoFactorEnabledNumber' => ['auth_tf_enabled', 'boolean'],
|
||||
'twoFactorTypeLength' => ['auth_tf_type', 'string', 'max' => 20],
|
||||
'twoFactorTypeLength' => ['auth_tf_mobile_phone', 'string', 'max' => 20],
|
||||
'twoFactorMobilePhoneLength' => ['auth_tf_mobile_phone', 'string', 'max' => 20],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ use Da\TwoFA\Manager;
|
||||
use Da\User\Contracts\ValidatorInterface;
|
||||
use Da\User\Model\User;
|
||||
use Da\User\Traits\ContainerAwareTrait;
|
||||
use Da\User\Service\TwoFactorEmailCodeGeneratorService;
|
||||
use Da\User\Service\TwoFactorQrCodeUriGeneratorService;
|
||||
use Yii;
|
||||
|
||||
class TwoFactorCodeValidator implements ValidatorInterface
|
||||
@ -94,6 +94,6 @@ class TwoFactorCodeValidator implements ValidatorInterface
|
||||
*/
|
||||
public function generateCode()
|
||||
{
|
||||
return $this->make(TwoFactorEmailCodeGeneratorService::class,[$this->user])->run();
|
||||
return $this->make(TwoFactorQrCodeUriGeneratorService::class,[$this->user])->run();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user