Rev 11237 | Rev 13021 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | bad= |
5125 | bpr | 2 | |
23 | reyssat | 3 | !if $pass!=$empty and $pass notsametext $pass2 |
12619 | bpr | 4 | login= |
5 | error=pass_discord |
||
6 | !exit |
||
23 | reyssat | 7 | !endif |
8 | |||
5125 | bpr | 9 | !if $auth_method isitemof $auth_method_list |
11237 | bpr | 10 | !if $idp_method=ldap |
11 | !read adm/class/initldap |
||
5125 | bpr | 12 | !if $ldap_login!=$empty |
13 | !set login_method=$idp_method $ldap_login |
||
14 | !endif |
||
15 | !endif |
||
5775 | bpr | 16 | up_external_auth=!lowercase $user_auth |
5136 | bpr | 17 | !if $new_user!=no |
18 | !read adm/class/hashlogin $user_auth,$class,$login_method |
||
19 | !endif |
||
5125 | bpr | 20 | !endif |
21 | |||
22 | !if $idp_method isitemof $idp_method_list |
||
5150 | bpr | 23 | !read adm/class/idp_$idp_method $user_auth |
5125 | bpr | 24 | firstname=$up_firstname |
25 | lastname=$up_lastname |
||
26 | email=$up_email |
||
27 | !endif |
||
28 | |||
23 | reyssat | 29 | !if $login=$empty or $lastname=$empty or $firstname=$empty or \ |
30 | ($new_user=yes and $pass=$empty) |
||
12619 | bpr | 31 | login= |
32 | error=empty_data |
||
33 | !exit |
||
23 | reyssat | 34 | !endif |
7403 | bpr | 35 | !set login_char=!charcnt $login |
36 | !if $login_char=3 |
||
37 | !set login=$(login)0 |
||
38 | !endif |
||
23 | reyssat | 39 | |
40 | test=!defof user_exists in $classdir1/.users/$login |
||
41 | !if $new_user=yes and $test=yes |
||
12619 | bpr | 42 | error=user_exists $login |
43 | login= |
||
44 | !exit |
||
23 | reyssat | 45 | !endif |
46 | |||
47 | !if $new_user=no and $test!=yes |
||
12619 | bpr | 48 | error=bad_user |
49 | !exit |
||
23 | reyssat | 50 | !endif |
51 | |||
52 | !if $new_user=yes or $pass!=$empty |
||
12619 | bpr | 53 | up_password=$pass |
23 | reyssat | 54 | !endif |
55 | |||
56 | test=!defof user_exists in $classdir1/.users/.$login |
||
57 | !if $test=yes |
||
12619 | bpr | 58 | login= |
59 | error=user_deleted |
||
60 | !exit |
||
23 | reyssat | 61 | !endif |
62 | |||
63 | up_lastname=$lastname |
||
64 | up_firstname=$firstname |
||
65 | up_email=$email |
||
66 | up_class=$wims_superclass |
||
5775 | bpr | 67 | up_external_auth=!lowercase $user_auth |
23 | reyssat | 68 | |
5136 | bpr | 69 | replacelist=external_auth,supervise,participate,email |
23 | reyssat | 70 | !read adm/class/adduser $login |
71 | |||
72 | !if $bad!=$empty |
||
12619 | bpr | 73 | error=bad_definition |
74 | !exit |
||
23 | reyssat | 75 | !endif |
76 |