diff options
Diffstat (limited to 'main/app/sprinkles/account/src/Repository/VerificationRepository.php')
-rwxr-xr-x | main/app/sprinkles/account/src/Repository/VerificationRepository.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/main/app/sprinkles/account/src/Repository/VerificationRepository.php b/main/app/sprinkles/account/src/Repository/VerificationRepository.php new file mode 100755 index 0000000..b0cf048 --- /dev/null +++ b/main/app/sprinkles/account/src/Repository/VerificationRepository.php @@ -0,0 +1,32 @@ +<?php +/** + * UserFrosting (http://www.userfrosting.com) + * + * @link https://github.com/userfrosting/UserFrosting + * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License) + */ +namespace UserFrosting\Sprinkle\Account\Repository; + +/** + * Token repository class for new account verifications. + * + * @author Alex Weissman (https://alexanderweissman.com) + * @see https://learn.userfrosting.com/users/user-accounts + */ +class VerificationRepository extends TokenRepository +{ + /** + * {@inheritDoc} + */ + protected $modelIdentifier = 'verification'; + + /** + * {@inheritDoc} + */ + protected function updateUser($user, $args) + { + $user->flag_verified = 1; + // TODO: generate user activity? or do this in controller? + $user->save(); + } +} |