UserHandler
Class that handles user specific task such as login or profile update
ERROR_TOKEN
Result Token: Error occurred while fetching
FAILED_TOKEN
Result Token: Failed to get
SIGNUP_FAILED
Sign up result: Sign up failed
SIGNUP_SUCCESS
Sign up result: Sign up successful
SIGNUP_USEREXIST
Sign up result: User already exists
deleteProfile
Deletes user profile of the current logged in user
true if success
getLoginToken
Fetches token from server and returns it
Token string. If error, one of the listed error tokens
getToken
Get the current session token
getUserEmail
Gets logged user email
getUsername
Gets logged user username (id)
getUsernameFrom
Returns the standard username from an email
username
isValidEmail
Validates email, with the global rules
true if its valid, false otherwise
isValidPassword
Validates password, with the global rules
logout
Logouts from the current session
sendLike
Sends a like/nope from the active user
sendMessage
Sends a message from the active user
signUp
Creates a new user with the info
Sign up result (one of the listed results const)
updateInfo
Updates user info
uploadProfilePicture
Uploads a new profile picture for the logged in user