Rev 13050 | 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 |
||
13021 | bpr | 16 | !if $idp_method=php |
17 | !set login_method=$idp_method |
||
18 | !endif |
||
5775 | bpr | 19 | up_external_auth=!lowercase $user_auth |
5136 | bpr | 20 | !if $new_user!=no |
13050 | bpr | 21 | !read adm/class/hashlogin $user_auth,$wims_superclass,$login_method |
5136 | bpr | 22 | !endif |
5125 | bpr | 23 | !endif |
24 | |||
13050 | bpr | 25 | !if $idp_method isitemof $idp_method_list |
26 | !read adm/class/idp_$idp_method $user_auth |
||
13142 | bpr | 27 | !default firstname=$up_firstname |
28 | !default lastname=$up_lastname |
||
29 | !default email=$up_email |
||
13050 | bpr | 30 | !endif |
5125 | bpr | 31 | |
23 | reyssat | 32 | !if $login=$empty or $lastname=$empty or $firstname=$empty or \ |
33 | ($new_user=yes and $pass=$empty) |
||
12619 | bpr | 34 | login= |
35 | error=empty_data |
||
36 | !exit |
||
23 | reyssat | 37 | !endif |
7403 | bpr | 38 | !set login_char=!charcnt $login |
39 | !if $login_char=3 |
||
40 | !set login=$(login)0 |
||
41 | !endif |
||
23 | reyssat | 42 | |
43 | test=!defof user_exists in $classdir1/.users/$login |
||
44 | !if $new_user=yes and $test=yes |
||
12619 | bpr | 45 | error=user_exists $login |
46 | login= |
||
47 | !exit |
||
23 | reyssat | 48 | !endif |
49 | |||
50 | !if $new_user=no and $test!=yes |
||
12619 | bpr | 51 | error=bad_user |
52 | !exit |
||
23 | reyssat | 53 | !endif |
54 | |||
55 | !if $new_user=yes or $pass!=$empty |
||
12619 | bpr | 56 | up_password=$pass |
23 | reyssat | 57 | !endif |
58 | |||
59 | test=!defof user_exists in $classdir1/.users/.$login |
||
60 | !if $test=yes |
||
12619 | bpr | 61 | login= |
62 | error=user_deleted |
||
63 | !exit |
||
23 | reyssat | 64 | !endif |
65 | |||
66 | up_lastname=$lastname |
||
67 | up_firstname=$firstname |
||
68 | up_email=$email |
||
69 | up_class=$wims_superclass |
||
5775 | bpr | 70 | up_external_auth=!lowercase $user_auth |
23 | reyssat | 71 | |
5136 | bpr | 72 | replacelist=external_auth,supervise,participate,email |
23 | reyssat | 73 | !read adm/class/adduser $login |
74 | |||
75 | !if $bad!=$empty |
||
12619 | bpr | 76 | error=bad_definition |
77 | !exit |
||
23 | reyssat | 78 | !endif |
79 |