aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Model/UserAccount.php
diff options
context:
space:
mode:
Diffstat (limited to 'Digitigrade/Model/UserAccount.php')
-rw-r--r--Digitigrade/Model/UserAccount.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/Digitigrade/Model/UserAccount.php b/Digitigrade/Model/UserAccount.php
index 72a9ce9..d0fa94b 100644
--- a/Digitigrade/Model/UserAccount.php
+++ b/Digitigrade/Model/UserAccount.php
@@ -59,6 +59,10 @@ class UserAccount extends Model {
return $user;
}
+ public static function findByLinkedActor(Actor $actor): ?self {
+ return self::findWhere('actor = ?', [$actor->id]);
+ }
+
public function verifyPassword(#[\SensitiveParameter] $attemptedPassword): bool {
return password_verify($attemptedPassword, $this->passwordHash);
}