5.2. GetUser: Log in using username and password¶
Implement this function:
GetUser(username string, password string) (userdataptr *User, err error)¶
Obtains the User struct of a user who has already been initialized and returns a pointer to it.
Returns an error if user has not been initialized or user credentials are invalid.
Returns an error if the User struct cannot be obtained due to malicious action or the integrity of the User struct has been compromised.
username (string) – Username
password (string) – Password
- Return type