21
21
def add_user (session , name , password , lastname , firstname , email ,
22
22
access_level = 'user' , hidden_notes = '' , linkedin_url = '' ,
23
23
twitter_url = '' , facebook_url = '' , google_url = '' , github_url = '' ,
24
- website_url = '' , bio = '' , is_want_news = True ):
24
+ website_url = '' , bio = '' , is_want_news = True ,
25
+ universities_id = None , university = None , graduation_year = None ):
25
26
"""Add a new user in the database.
26
27
27
28
Parameters
@@ -58,6 +59,12 @@ def add_user(session, name, password, lastname, firstname, email,
58
59
User biography.
59
60
is_want_news : bool, default is True
60
61
User wish to receive some news.
62
+ universities_id: int, default None
63
+ The id of the university
64
+ university: University
65
+ The university object
66
+ graduation_year: int, default=None
67
+ Graduation year for students
61
68
62
69
Returns
63
70
-------
@@ -74,7 +81,8 @@ def add_user(session, name, password, lastname, firstname, email,
74
81
linkedin_url = linkedin_url , twitter_url = twitter_url ,
75
82
facebook_url = facebook_url , google_url = google_url ,
76
83
github_url = github_url , website_url = website_url , bio = bio ,
77
- is_want_news = is_want_news )
84
+ is_want_news = is_want_news , universities_id = universities_id ,
85
+ graduation_year = graduation_year )
78
86
79
87
# Creating default team with the same name as the user
80
88
# user is admin of his/her own team
0 commit comments