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: domain.User
– Data about the created user.domain.Authorizations
– Privileges attached to the created user.
Return type: Tuple
[User
,Authorizations
]- user (
-
arxiv.users.legacy.accounts.
update
(user)[source]¶ Update a user in the database.
Return type: Tuple
[User
,Authorizations
]