Description:
modify user list creation into user list update
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r469:b28cd479ede6 - - 1 file changed: 11 inserted, 5 deleted
@@ -84,11 +84,17 | |||
|
84 | 84 | added_random_password = true |
|
85 | 85 | end |
|
86 | 86 | |
|
87 |
- user = User. |
|
|
88 | - :full_name => full_name, | |
|
89 | - :password => password, | |
|
90 |
- |
|
|
91 | - :alias => user_alias}) | |
|
87 | + user = User.find_by_login(login) | |
|
88 | + if (user) | |
|
89 | + user.full_name = full_name | |
|
90 | + user.password = password | |
|
91 | + else | |
|
92 | + user = User.new({:login => login, | |
|
93 | + :full_name => full_name, | |
|
94 | + :password => password, | |
|
95 | + :password_confirmation => password, | |
|
96 | + :alias => user_alias}) | |
|
97 | + end | |
|
92 | 98 | user.activated = true |
|
93 | 99 | user.save |
|
94 | 100 |
You need to be logged in to leave comments.
Login now