Return to API Reference
Extra functionality for the Userena model.
Activate an User by supplying a valid activation_key.
If the key is valid and an user is found, activates the user and return it. Also sends the activation_complete signal.
Parameters: | activation_key – String containing the secret SHA1 for a valid activation. |
---|---|
Returns: | The newly activated User or False if not successful. |
Check if activation_key is still valid.
Parameters: | activation_key – String containing the secret SHA1 for a valid activation. |
---|---|
Returns: | True if the ket has expired, False if still valid. |
Checks that all permissions are set correctly for the users.
Returns: | A set of users whose permissions was wrong. |
---|
Confirm an email address by checking a confirmation_key.
A valid confirmation_key will set the newly wanted e-mail address as the current e-mail address. Returns the user after success or False when the confirmation key is invalid. Also sends the confirmation_complete signal.
Parameters: | confirmation_key – String containing the secret SHA1 that is used for verification. |
---|---|
Returns: | The verified User or False if not successful. |
A simple wrapper that creates a new User.
Parameters: |
|
---|---|
Returns: | User instance representing the new user. |
Creates an UserenaSignup instance for this user.
Parameters: | user – Django User instance. |
---|---|
Returns: | The newly created UserenaSignup instance. |
Checks for expired users and delete’s the User associated with it. Skips if the user is_staff.
Returns: | A list containing the deleted users. |
---|
Creates a new activation_key resetting activation timeframe when users let the previous key expire.
Parameters: | activation_key – String containing the secret SHA1 activation key. |
---|
Manager for UserenaProfile
Returns all the visible profiles available to this user.
For now keeps it simple by just applying the cases when a user is not active, a user has it’s profile closed to everyone or a user only allows registered users to view their profile.
Parameters: | user – A Django User instance. |
---|---|
Returns: | All profiles that are visible to this user. |