Rev 12498 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | n=!recordcnt wimshome/log/.developers |
2 | !for i=1 to $n |
||
3 | r=!record $i of wimshome/log/.developers |
||
4 | !distribute lines $r into ll,pp,nn,ee |
||
5 | !if $ll=$auth_login |
||
12498 | bpr | 6 | a_passwd=$pp |
7 | auth_name=$nn |
||
8 | auth_email=$ee |
||
9 | !break |
||
23 | reyssat | 10 | !endif |
11 | !next i |
||
12 | |||
13 | !if $confirm=$empty |
||
12498 | bpr | 14 | !exit |
23 | reyssat | 15 | !endif |
16 | |||
17 | p_name=!trim $p_name |
||
18 | p_email=!trim $p_email |
||
19 | p_pass1=!trim $p_pass1 |
||
20 | p_pass2=!trim $p_pass2 |
||
21 | |||
22 | !if $p_name=$empty or @ notin $p_email |
||
12498 | bpr | 23 | !exit |
23 | reyssat | 24 | !endif |
25 | |||
26 | !if $p_pass1!=$empty |
||
12498 | bpr | 27 | passcheck=!text select $alnum in $p_pass1 |
28 | passcnt=!charcnt $passcheck |
||
29 | !if $passcheck!=$p_pass1 or $p_pass1!=$p_pass2 or \ |
||
30 | passcnt<4 or $passcnt>16 |
||
31 | error=bad_pass |
||
32 | !exit |
||
33 | !endif |
||
34 | passchange=yes |
||
15324 | bpr | 35 | p_passwd=!passcrypt $p_pass1 |
23 | reyssat | 36 | !else |
15324 | bpr | 37 | p_passwd=!passcrypt $a_passwd |
23 | reyssat | 38 | !endif |
39 | |||
40 | !if $p_name=$auth_name and $p_email=$auth_email and $passchange!=yes |
||
12498 | bpr | 41 | !exit |
23 | reyssat | 42 | !endif |
43 | |||
44 | content=$p_passwd\n$p_name\n$p_email |
||
45 | |||
46 | !sh cd $wims_home/log\ |
||
47 | awk 'BEGIN {a=0}; \ |
||
48 | /^:/ {a=0}; \ |
||
49 | /^:$auth_login$$/ {a=1}; \ |
||
50 | a==0 {print}; \ |
||
51 | a==1 {print; print "$content"; a=2}; \ |
||
52 | ' .developers >.dev \ |
||
53 | mv -f .dev .developers |
||
54 | |||
55 | n=!recordcnt wimshome/log/.developers |
||
56 | !for i=1 to $n |
||
57 | r=!record $i of wimshome/log/.developers |
||
58 | !distribute lines $r into ll,pp,nn,ee |
||
59 | !if $ll=$auth_login |
||
12498 | bpr | 60 | auth_name=$nn |
61 | auth_email=$ee |
||
62 | !break |
||
23 | reyssat | 63 | !endif |
64 | !next i |
||
65 | |||
66 | !if $passchange=yes |
||
12498 | bpr | 67 | wims_module_log $auth_login change password. |
23 | reyssat | 68 | !else |
12498 | bpr | 69 | wims_module_log $auth_login change properties. |
70 | !endif |