Last active
May 13, 2021 10:33
-
-
Save Solution/44c2e69acd24d9f484d5a5ab3bf72014 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type User struct { | |
gorm.Model | |
Username string | |
Firstname string | |
Surname string | |
Email string | |
Phone string | |
Password string | |
Role string | |
Active bool | |
} | |
FindExistingUser(username string) model.User { | |
var user model.User | |
database.Where("username = ?", username).First(&user) | |
return user | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment