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