Rev 2389 | 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 |
||
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 |
||
35 | p_passwd=$p_pass1 |
||
23 | reyssat | 36 | !else |
12498 | bpr | 37 | p_passwd=$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 | |||
12498 | bpr | 55 | |
23 | reyssat | 56 | n=!recordcnt wimshome/log/.developers |
57 | !for i=1 to $n |
||
58 | r=!record $i of wimshome/log/.developers |
||
59 | !distribute lines $r into ll,pp,nn,ee |
||
60 | !if $ll=$auth_login |
||
12498 | bpr | 61 | auth_name=$nn |
62 | auth_email=$ee |
||
63 | !break |
||
23 | reyssat | 64 | !endif |
65 | !next i |
||
66 | |||
67 | !if $passchange=yes |
||
12498 | bpr | 68 | wims_module_log $auth_login change password. |
23 | reyssat | 69 | !else |
12498 | bpr | 70 | wims_module_log $auth_login change properties. |
71 | !endif |