5.1 GetUser
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:
- There is no initialized user for the given username.
- The user credentials are invalid.
- The User struct cannot be obtained due to malicious action, or the integrity of the user struct has been compromised.
- Parameters
-
username (string), password (string)
- Return
-
userdataptr (*User), err (error)
Do not forget that your design must satisfy all requirements, including:
- The client application must not use the local filesystem.
- Users can have multiple active user sessions at once.
- You cannot use global variables to store user information.