# Uses of Class
com.logicaldoc.core.security.user.User

Packages that use User
Package
Description
com.logicaldoc.core.automation
Automation subsystem that allows you to program your own logic inside the platform.
The automation engine can be accessed through the class `Automation`
Please note the special annotation `AutomationDictionary` that is used to automatically put in the Dictionary whatever bean you need.
com.logicaldoc.core.document
Contains the definitions of `Document` and `Version` as well as other related objects
com.logicaldoc.core.history
com.logicaldoc.core.security
Container of the security-related interfaces and classes
com.logicaldoc.core.security.authentication
The pluggable authentication mechanism.
com.logicaldoc.core.security.user
Definition of the User object and ancillary objects
com.logicaldoc.core.util

## Uses of User in com.logicaldoc.core.automation

Methods in com.logicaldoc.core.automation that return User
Modifier and Type
Method
Description
`User`
SecurityTool.`getUser(long userId)`
Retrieves a user object
`User`
SecurityTool.`getUser(String username)`
Retrieves a user object
`User`
UserTool.`getUser(long userId)`
Retrieves a user object
`User`
UserTool.`getUser(String username)`
Retrieves a user object
Methods in com.logicaldoc.core.automation with parameters of type User
Modifier and Type
Method
Description
`void`
UserTool.`initialize(User user)`
Initializes lazy loaded collections

## Uses of User in com.logicaldoc.core.document

Methods in com.logicaldoc.core.document with parameters of type User
Modifier and Type
Method
Description
`static Version`
Version.`create(Document document, User user, String comment, DocumentEvent event, boolean release)`
Factory method that creates a Version and replicate all given document's properties.
The new version and fileVersion will be set in both Document and Version
Important: The created Version is not persistent

## Uses of User in com.logicaldoc.core.history

Methods in com.logicaldoc.core.history that return User
Modifier and Type
Method
Description
`User`
History.`getUser()`
Methods in com.logicaldoc.core.history with parameters of type User
Modifier and Type
Method
Description
`void`
History.`setUser(User user)`
This setter sets the userId and username and other informations that can be captured by the given user

## Uses of User in com.logicaldoc.core.security

Methods in com.logicaldoc.core.security that return User
Modifier and Type
Method
Description
`User`
Session.`getUser()`
Methods in com.logicaldoc.core.security with parameters of type User
Modifier and Type
Method
Description
`Device`
DeviceDAO.`trustDevice(User user, Device device)`
Trusts a device for a user
`Device`
HibernateDeviceDAO.`trustDevice(User user, Device requestDevice)`

## Uses of User in com.logicaldoc.core.security.authentication

Methods in com.logicaldoc.core.security.authentication that return User
Modifier and Type
Method
Description
`User`
AbstractAuthenticator.`authenticate(String username, String password, String key)`
`User`
AbstractAuthenticator.`authenticate(String username, String password, String key, Client client)`
`User`
ApiKeyAuthenticator.`authenticate(String username, String password)`
`User`
ApiKeyAuthenticator.`authenticate(String username, String password, String apikey, Client client)`
`final User`
AuthenticationChain.`authenticate(String username, String password)`
`final User`
AuthenticationChain.`authenticate(String username, String password, String key, Client client)`
`User`
Authenticator.`authenticate(String username, String password)`
Authenticates the user using the given credentials, if successful, the corresponding user is returned.
`User`
Authenticator.`authenticate(String username, String password, String key)`
Authenticates the user using the given credentials, if successful, the corresponding user is returned.
`User`
Authenticator.`authenticate(String username, String password, String key, Client client)`
Authenticates the user using the given credentials, if successful, the corresponding user is returned.
`User`
DefaultAuthenticator.`authenticate(String username, String password)`
`User`
DefaultAuthenticator.`authenticate(String username, String password, String key, Client client)`
`User`
AuthenticationChain.`pickUser(String username)`
`User`
Authenticator.`pickUser(String username)`
This method does not authenticate the user but just retrieves his details
`User`
DefaultAuthenticator.`pickUser(String username)`
Methods in com.logicaldoc.core.security.authentication with parameters of type User
Modifier and Type
Method
Description
`void`
DefaultAuthenticator.`validateUser(User user)`
Perform some security validations on the user but does not check the password.

## Uses of User in com.logicaldoc.core.security.user

Methods in com.logicaldoc.core.security.user that return User
Modifier and Type
Method
Description
`User`
HibernateUserDAO.`findAdminUser(String tenantName)`
`User`
UserDAO.`findAdminUser(String tenantName)`
Retrieve the administrator for the given tenant.
`User`
HibernateUserDAO.`findById(long id)`
`User`
HibernateUserDAO.`findByUsername(String username)`
`User`
UserDAO.`findByUsername(String username)`
This method finds an User by its username.
`User`
HibernateUserDAO.`findByUsernameIgnoreCase(String username)`
`User`
UserDAO.`findByUsernameIgnoreCase(String username)`
This method finds an User by its username.
`User`
Group.`getUser()`
If this is a user group, then it returns the user
`User`
HibernateUserDAO.`getUser(String username)`
`User`
UserDAO.`getUser(String username)`
Depending on the global setting, it invokes findByUsername or findByUsernameIgnoreCase
Methods in com.logicaldoc.core.security.user that return types with arguments of type User
Modifier and Type
Method
Description
`Set<User>`
HibernateUserDAO.`findByGroup(long groupId)`
`Set<User>`
UserDAO.`findByGroup(long groupId)`
Retrieves the users belonging to a given group.
`List<User>`
HibernateUserDAO.`findByLikeUsername(String username)`
`List<User>`
UserDAO.`findByLikeUsername(String username)`
This method finds an User by username.
`List<User>`
HibernateUserDAO.`findByName(String name)`
`List<User>`
UserDAO.`findByName(String name)`
This method finds an User by name.
`List<User>`
HibernateUserDAO.`findByUsernameAndName(String username, String name)`
`List<User>`
UserDAO.`findByUsernameAndName(String username, String name)`
This method finds an User by username and name.
`Set<User>`
Group.`getUsers()`
Methods in com.logicaldoc.core.security.user with parameters of type User
Modifier and Type
Method
Description
`void`
UserListener.`afterStore(User user, UserHistory transaction, Map<String,Object> dictionary)`
Called after a user is stored in the database
`void`
UserListener.`beforeStore(User user, UserHistory transaction, Map<String,Object> dictionary)`
Called before a user is stored in the database
`void`
HibernateUserDAO.`checkPasswordCompliance(User user)`
`void`
UserDAO.`checkPasswordCompliance(User user)`
Checks if the user's password complies the current quality criteria
`UserHistory`
HibernateUserHistoryDAO.`createUserHistory(User user, UserEvent eventType, String comment, String sessionId, Client client)`
`UserHistory`
UserHistoryDAO.`createUserHistory(User user, UserEvent event, String comment, String sessionId, Client client)`
Creates an user history entry
`void`
HibernateUserDAO.`initialize(User user)`
`void`
HibernateUserDAO.`store(User user)`
`void`
HibernateUserDAO.`store(User user, UserHistory transaction)`
`void`
UserDAO.`store(User user)`
`void`
UserDAO.`store(User user, UserHistory transaction)`
This method persists the user object and insert a new user history entry.
Method parameters in com.logicaldoc.core.security.user with type arguments of type User
Modifier and Type
Method
Description
`void`
Group.`setUsers(Set<User> users)`

## Uses of User in com.logicaldoc.core.util

Methods in com.logicaldoc.core.util with parameters of type User
Modifier and Type
Method
Description
`static void`
UserUtil.`generateDefaultAvatar(User user)`
Updates the avatar of a user with the default avatar that is the Gravatar or the auto-generated image(in case Gravatar is not available)
`static void`
UserUtil.`saveAvatar(User user, File avatarImageFile, String imageType)`
Updates the avatar of a user with a given .png image