arxiv.users.legacy.accounts module

Provide methods for working with user accounts.

arxiv.users.legacy.accounts.email_exists(email)[source]

Determine whether a user with a particular address already exists.

Parameters:email (str) –
Returns:
Return type:bool
Return type:bool
arxiv.users.legacy.accounts.get_user_by_id(user_id)[source]

Load user data from the database.

Return type:User
arxiv.users.legacy.accounts.register(user, password, ip, remote_host)[source]

Create a new user.

Parameters:
  • user (domain.User) – User data for the new account.
  • password (str) – Password for the account.
  • ip (str) – The IP address of the client requesting the registration.
  • remote_host (str) – The remote hostname of the client requesting the registration.
Returns:

Return type:

Tuple[User, Authorizations]

arxiv.users.legacy.accounts.update(user)[source]

Update a user in the database.

Return type:Tuple[User, Authorizations]
arxiv.users.legacy.accounts.username_exists(username)[source]

Determine whether a user with a particular username already exists.

Parameters:username (str) –
Returns:
Return type:bool
Return type:bool