diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2012-05-18 10:16:04 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2012-05-18 10:18:23 +0200 |
| commit | f83cc90e1ac9f252dcc36d833505ab5e00ae8e74 (patch) | |
| tree | 799475b6a878895d597496092c62befcb3dc8234 /user/HTC/reguser.htc | |
| parent | efe1dd9bf92efbf6ab74f7323c39348b5efae4ce (diff) | |
Adding the old test user
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'user/HTC/reguser.htc')
| -rw-r--r-- | user/HTC/reguser.htc | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/user/HTC/reguser.htc b/user/HTC/reguser.htc new file mode 100644 index 0000000..0a5835c --- /dev/null +++ b/user/HTC/reguser.htc | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | \clearance{ADM} | ||
| 2 | \alias{RegUser} | ||
| 3 | \setgroup{\user.group} | ||
| 4 | \const{CLEARLIST}{\user.group HTC} | ||
| 5 | \page{ | ||
| 6 | \title{Register User as \group} | ||
| 7 | |||
| 8 | \switch{\T.RES} | ||
| 9 | {BEM}{ | ||
| 10 | \font{color=red}{Bad email.} | ||
| 11 | } | ||
| 12 | {USEX}{ | ||
| 13 | \font{color=red}{User already exist.} | ||
| 14 | } | ||
| 15 | {ERR}{ | ||
| 16 | \font{color=red}{An error occured - user not added.} | ||
| 17 | } | ||
| 18 | |||
| 19 | <p> | ||
| 20 | \bf{NOTE:} Remember to use \bf{valid, fully qualified e-mail addresses!}. | ||
| 21 | Local network aliases will be added if applicable. | ||
| 22 | If you manage multiple groups, make sure you add this person with | ||
| 23 | the correct clearance! | ||
| 24 | <p> | ||
| 25 | A welcome message will be sent to the new user. | ||
| 26 | |||
| 27 | \form{\uri}{ | ||
| 28 | \table{bgcolor=#dddddd}{ | ||
| 29 | \tr{ | ||
| 30 | \td{align=right}{E-mail:} | ||
| 31 | \td{colspan=3}{\input{EMAIL}{46}} | ||
| 32 | } | ||
| 33 | \tr{ | ||
| 34 | \td{align=right}{Name:} | ||
| 35 | \td{colspan=3}{\input{NAME}{46}} | ||
| 36 | } | ||
| 37 | \tr{ | ||
| 38 | \td{align=right}{URL:} | ||
| 39 | \td{colspan=3}{\input{w.URL}{46}} | ||
| 40 | } | ||
| 41 | \tr{ | ||
| 42 | \td{align=right}{Group:}\td{\group} | ||
| 43 | \td{align=right}{Clearance:}\td{\CLEARLIST} | ||
| 44 | } | ||
| 45 | \tr{ | ||
| 46 | \td{align=right}{Position:}\td{colspan=3}{\select.posit{w.POSIT}{Temp}} | ||
| 47 | } | ||
| 48 | \tr{ | ||
| 49 | \td{align=right}{Phone:}\td{\input{w.EXT}{10}} | ||
| 50 | \td{align=right}{Room:}\td{\input{w.ROOM}{10}} | ||
| 51 | } | ||
| 52 | \tr{ | ||
| 53 | \td{align=right}{Note:}\td{colspan=3}{\input{w.NOTE}{46}} | ||
| 54 | } | ||
| 55 | } | ||
| 56 | <p> | ||
| 57 | \button{Register this User} | ||
| 58 | } | ||
| 59 | } | ||
| 60 | \onpost{ | ||
| 61 | \if(\T.EMAIL cnt "@" && \T.EMAIL cnt "."){ | ||
| 62 | \if{\getuser{\T.EMAIL}}{ | ||
| 63 | \redirect{\this?RES=USEX} | ||
| 64 | }{ | ||
| 65 | \su{\newuser{\CLEARLIST}{\T.EMAIL}{\T.NAME}}{ | ||
| 66 | \const{T.w.ID}{\user.id}; | ||
| 67 | \db{PREFS}{\import{@}{T.w.}[LASTMOD=\now]} | ||
| 68 | \mail.user{Registration at \server.alias}{ | ||
| 69 | \user.name, welcome to the \server.alias server at | ||
| 70 | |||
| 71 | \server/ | ||
| 72 | |||
| 73 | Your alias is: \user.alias | ||
| 74 | Your PIN-code is: \user.pin | ||
| 75 | |||
| 76 | Please take a minute or two to go through the pages | ||
| 77 | and familiarize yourself with the login/logout procedure. | ||
| 78 | |||
| 79 | \server/LOGIN/?alias=\user.alias | ||
| 80 | |||
| 81 | /Admin | ||
| 82 | } | ||
| 83 | \redirect{\pwd/admin.htc?ID=\user.id} | ||
| 84 | }{ | ||
| 85 | \redirect{\this?RES=ERR} | ||
| 86 | } | ||
| 87 | } | ||
| 88 | }{ | ||
| 89 | \redirect{\this?RES=BEM} | ||
| 90 | } | ||
| 91 | } | ||
