From 8f2180401fd05ba63633d9559dc156f5ca1573ba Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sat, 9 Sep 2023 10:20:31 +0530 Subject: logging in with either username or email --- user/user.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'user/user.go') 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 } -- cgit v1.2.3