public class User extends Api
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOGGER
Logging helper object.
|
Constructor and Description |
---|
User(XWikiUser user,
XWikiContext context)
Constructs a wrapper for the given protected XWikiUser object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkPassword(String password)
Check if the password passed as argument is the user password.
|
String |
getEmail()
API to retrieve the e-mail address of this user.
|
XWikiUser |
getUser()
Expose the wrapped XWikiUser object.
|
boolean |
isDisabled() |
protected boolean |
isMain()
See if the user is global (i.e.
|
boolean |
isUserInGroup(String groupName)
Check if the user belongs to a group or not.
|
void |
setDisabledStatus(boolean disabledStatus)
Set the disabled status of a user.
|
convert, convert, convert, convertAttachments, getAuthorizationManager, getContextualAuthorizationManager, getXWikiContext, hasAccess, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
public User(XWikiUser user, XWikiContext context)
user
- The XWikiUser object that should be wrapper.context
- The current context
.@Programming public XWikiUser getUser()
@Unstable public void setDisabledStatus(boolean disabledStatus)
disabledStatus
- true to disable an user, false to enable it back.@Unstable public boolean isDisabled()
true
if the user is disabled, false if it is enabled.public boolean isUserInGroup(String groupName)
groupName
- The group to check.protected boolean isMain()
See if the user is global (i.e. registered in the main wiki) or local to a virtual wiki.
This method is not public, as the underlying implementation is not fully functional
public String getEmail()
public boolean checkPassword(String password) throws XWikiException
password
- Password submitted.XWikiException
- error if authorization denied.Copyright © 2004–2021 XWiki. All rights reserved.