Managers

Return to API Reference

UserenaManager

class userena.managers.UserenaManager

Extra functionality for the Userena model.

activate_user(username, activation_key)

Activate an User by supplying a valid activation_key.

If the key is valid and an user is found, activate the user and return it.

check_permissions()

Checks that all permissions are set correctly for the users.

Returns a set of users whose permissions was wrong.

confirm_email(username, confirmation_key)

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.

create_inactive_user(username, email, password)

A simple wrapper that creates a new User.

create_userena_profile(user)

Creates an userena profile

delete_expired_users()

Checks for expired users and delete’s the User associated with it. Skips if the user is_staff.

Returns a list of the deleted users.

UserenaBaseProfileManager

class userena.managers.UserenaBaseProfileManager

Manager for UserenaProfile

get_visible_profiles(user=None)

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.

Keyword Arguments

user
A django User instance.

Table Of Contents

Previous topic

Forms

Next topic

Models

This Page