Modules collectives.models.user#

Module for user related classes

class collectives.models.user.User(**kwargs)#

Class to manage user.

Persistence is managed by SQLAlchemy. This class is used by flask_login to manage acccess to the system.

avatar#

URL to avatar file.

Type

string

badges#

List all badged associated to this user

Type

list(collectives.models.badge.Badge)

confidentiality_agreement_signature_date#

Date of the signature of confidentiality agreement.

The agreement signature is mandatory for all users with special functions within this site. If it has not been signed, confidentiality_agreement_signature_date is null.

Type

datetime.datetime

date_of_birth#

User date of birth.

Type

datetime.date

emergency_contact_name#

Name of User emergency contact.

Type

string (100 char)

emergency_contact_phone#

Phone number of User emergency contact.

Type

string (20 char)

enabled#

User status.

Only an enabled user can login.

Type

boolean

first_name#

User first name.

Type

string

gender#

User gender.

For a user from FFCAM extranet, it is guessed from its title. See collectives.utils.extranet.sync_user().

Type

Gender

id#

Database primary key.

Type

int

last_extranet_sync_time#

Last synchronisation date of user profile with FFCAM extranet.

Type

datetime.datetime

last_failed_login#

Last failed login attempt on user account.

It is the date of the last time a wrong password has been used to connect. It is used to rate limit login attempt. See collectives.routes.auth.login().

Type

datetime.datetime

last_name#

User last name.

Type

string

legal_text_signature_date#

Date of the signature of the legal terms.

All user must sign the legal term at account creation. If it has not been signed (usually test account), confidentiality_agreement_signature_date is null.

Type

datetime.datetime

legal_text_signed_version#

Date of the signature of the legal terms.

All user must sign the legal term at account creation. If it has not been signed (usually test account), confidentiality_agreement_signature_date is null.

Type

datetime.datetime

license#

User club license number.

Type

string (100 char)’

license_category#

User club license category.

Type

string (2 char)

license_expiry_date#

User license expiration date.

Type

datetime.date

mail#

User email address.

Type

string

password#

Hashed password.

Hash is done with pbkdf2_sha512: https://fr.wikipedia.org/wiki/PBKDF2 .

Type

string

payments#

List of payments made by the user.

Type

list(collectives.models.payment.Payment)

phone#

User phone number.

Type

string (20 char)

question_answers#

List of question answers authored by this user

Type

list(collectives.models.question.QuestionAnswer)

registrations#

List registration of the user.

Type

list(collectives.models.registration.Registration)

reported_payments#

List of payments reported by the user (that is, manually entered by the user).

Type

list(collectives.models.payment.Payment)

reservations#

List of reservations made by the user.

Type

list(collectives.models.reservation.Reservation)

roles#

List of granted roles within this site for this user. (eg administrator)

Type

list(collectives.models.role.Role)

type#

User type.

It will change how this user will be managed.

Type

UserType

collectives.models.user.activity_supervisors(activities)#

Returns all supervisors for a list of activities

Returns

List of all activities for configuration

Return type

Array