Skip to content

Commit 7ce972f

Browse files
committed
Merge branch 'master' into 3.0
2 parents 4baee2f + 85d5133 commit 7ce972f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/Traits/UserVerification.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait UserVerification
1515
*/
1616
public function isVerified()
1717
{
18-
return $this->verified === 1;
18+
return (bool) $this->verified;
1919
}
2020

2121
/**
@@ -25,6 +25,16 @@ public function isVerified()
2525
*/
2626
public function isPendingVerification()
2727
{
28-
return $this->verified === 0 && $this->verification_token !== null;
28+
return ! $this->isVerified() && $this->hasVerificationToken();
29+
}
30+
31+
/**
32+
* Checks if the user has a verification token.
33+
*
34+
* @return bool
35+
*/
36+
public function hasVerificationToken()
37+
{
38+
return ! is_null($this->verification_token);
2939
}
3040
}

0 commit comments

Comments
 (0)