public class LoggedUser extends User
| Modifier and Type | Method and Description |
|---|---|
boolean |
canEdit()
Can this user be edited?
|
void |
set(java.lang.String username,
java.lang.String bio,
java.lang.String avatar)
Changes the username, bio or avatar of the user.
|
void |
setAvatar(java.lang.String avatar)
Sets this user's avatar.
|
void |
setBio(java.lang.String bio)
Sets this user's bio.
|
void |
setUsername(java.lang.String username)
Sets this user's name.
|
asLogged, equals, getAvatar, getAvatarUrl, getBio, getID, getName, hashCode, isBanned, query, toString, updateisNew, isValid, isValid, setTimeBeforeRemoval, usepublic boolean canEdit()
UserThis method will always return false for a User, and will always return true for a
LoggedUser
canEdit in class Usertrue if the user's information can edited.Get this object as a LoggedUserpublic void setBio(java.lang.String bio)
This method is a wrapper around set(String, String, String), see its documentation for more
information.
bio - the new biopublic void setUsername(java.lang.String username)
This method is a wrapper around set(String, String, String), see its documentation for more
information.
username - the new user's namepublic void setAvatar(java.lang.String avatar)
This method is a wrapper around set(String, String, String), see its documentation for more
information.
avatar - the new user's avatarpublic void set(java.lang.String username,
java.lang.String bio,
java.lang.String avatar)
This method uses client-side prediction, which means that the changes will be reflected to the current object immediately, and the query will be sent to the server.
You can select which fields to update and which fields to keep by giving null to any unchanged field.
However, you cannot specify ONLY null values (the request to the server would be empty!)
username - the user's namebio - the user's bioavatar - the user's avatar (URL path)Set only the avatar,
Set only the bio,
Set only the username