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