portal.mkgtu.ru/common/models/repositories/UserRegistrationConfirmToke...

21 lines
470 B
PHP
Raw Permalink Normal View History

2024-03-28 09:51:45 +03:00
<?php
namespace common\models\repositories;
use common\models\User;
use common\models\UserRegistrationConfirmToken;
class UserRegistrationConfirmTokenRepository
{
public static function findActiveTokenByHashAndUser($hash, User $user) {
return UserRegistrationConfirmToken::findOne([
'user_id' => $user->id,
'confirm_token' => $hash,
'status' => UserRegistrationConfirmToken::STATUS_UNTOUCHED
]);
}
}