diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-09-09 10:20:31 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-09-09 10:20:31 +0530 |
commit | 8f2180401fd05ba63633d9559dc156f5ca1573ba (patch) | |
tree | f3d2f59b04d5940bc5028904d6ce9d551aace86a /user/user.go | |
parent | cba9f19ba50c60576a5961e89c24caefca52d740 (diff) |
logging in with either username or emailv0.0.6
Diffstat (limited to 'user/user.go')
-rw-r--r-- | user/user.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/user/user.go b/user/user.go index 68ceb47..ee36e95 100644 --- a/user/user.go +++ b/user/user.go @@ -44,9 +44,8 @@ type User struct { IsVerified bool } -func CheckPassword(id uint, pass string) error { - var user User - err := GetUser(&user, id) +func CheckPassword(user *User, accountName, method, pass string) error { + err := GetUserWithAccountName(user, accountName, method) if err != nil { return err } |