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