The user object is retuned by AuthAdmin
and AuthManager
objects' user() method and should not be created directly.
The attributes firstname
, surname
, email
, password
, group
and active
can all be directly set and their values will be updated in the database.
The class has the following properties:
username = username.lower()
The username of a user cannot be changed.
None
if no group has been set. Optional
True
or False
depending on whether the user is considered active.
AuthManager
or AuthAdmin
objects. Warning:
Changing the value stored in levels
will not update the database.
AuthManager
or AuthAdmin
objects. Warning:
Changing the value stored in roles
will not update the database.
[app=None], [level=None], [role=None], [active=1], [group=[]]) |
True
if the user is authorised for the options specified, False
otherwise.
If active=0 only disabled accounts are authorised, if active=None both active and disabled accounts are authorised. If group is not specified all groups are authorised, if group=None only users not in a group are authorised, otherwise only users in the group specified are authorised. If level or role are specified, app must be specified too.