Subversion Repositories wimsdev

Rev

Rev 2217 | Rev 5136 | 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
4
 login=
5
 error=pass_discord
6
 !exit
7
!endif
8
 
5125 bpr 9
!if $auth_method isitemof $auth_method_list
10
  !if $idp_method=ldap 
11
    !read adm/class/initldap 
12
    !if $ldap_login!=$empty
13
      !set login_method=$idp_method $ldap_login
14
    !endif
15
  !endif
16
  up_external_auth=$user_auth
17
  !read adm/class/hashlogin $user_auth,$class,$login_method
18
!endif
19
 
20
!if $idp_method isitemof $idp_method_list
21
  !read idp_$idp_method $user_auth
22
  firstname=$up_firstname
23
  lastname=$up_lastname
24
  email=$up_email
25
!endif
26
 
23 reyssat 27
!if $login=$empty or $lastname=$empty or $firstname=$empty or \
28
  ($new_user=yes and $pass=$empty)
29
 login=
30
 error=empty_data
31
 !exit
32
!endif
33
 
34
test=!defof user_exists in $classdir1/.users/$login
35
!if $new_user=yes and $test=yes
36
 login=
37
 error=user_exists
38
 !exit
39
!endif
40
 
41
!if $new_user=no and $test!=yes
42
 error=bad_user
43
 !exit
44
!endif
45
 
46
!if $new_user=yes or $pass!=$empty
47
 up_password=$pass
48
!endif
49
 
50
test=!defof user_exists in $classdir1/.users/.$login
51
!if $test=yes
52
 login=
53
 error=user_deleted
54
 !exit
55
!endif
56
 
57
up_lastname=$lastname
58
up_firstname=$firstname
59
up_email=$email
60
up_class=$wims_superclass
61
 
62
!read adm/class/adduser $login
63
 
64
!if $bad!=$empty
65
 error=bad_definition
66
 !exit
67
!endif
68