From f83cc90e1ac9f252dcc36d833505ab5e00ae8e74 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 18 May 2012 10:16:04 +0200 Subject: Adding the old test user Signed-off-by: Henrik Rydberg --- user/HTC/reguser.htc | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 user/HTC/reguser.htc (limited to 'user/HTC/reguser.htc') 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 @@ +\clearance{ADM} +\alias{RegUser} +\setgroup{\user.group} +\const{CLEARLIST}{\user.group HTC} +\page{ + \title{Register User as \group} + + \switch{\T.RES} + {BEM}{ + \font{color=red}{Bad email.} + } + {USEX}{ + \font{color=red}{User already exist.} + } + {ERR}{ + \font{color=red}{An error occured - user not added.} + } + +

+ \bf{NOTE:} Remember to use \bf{valid, fully qualified e-mail addresses!}. + Local network aliases will be added if applicable. + If you manage multiple groups, make sure you add this person with + the correct clearance! +

+ A welcome message will be sent to the new user. + + \form{\uri}{ + \table{bgcolor=#dddddd}{ + \tr{ + \td{align=right}{E-mail:} + \td{colspan=3}{\input{EMAIL}{46}} + } + \tr{ + \td{align=right}{Name:} + \td{colspan=3}{\input{NAME}{46}} + } + \tr{ + \td{align=right}{URL:} + \td{colspan=3}{\input{w.URL}{46}} + } + \tr{ + \td{align=right}{Group:}\td{\group} + \td{align=right}{Clearance:}\td{\CLEARLIST} + } + \tr{ + \td{align=right}{Position:}\td{colspan=3}{\select.posit{w.POSIT}{Temp}} + } + \tr{ + \td{align=right}{Phone:}\td{\input{w.EXT}{10}} + \td{align=right}{Room:}\td{\input{w.ROOM}{10}} + } + \tr{ + \td{align=right}{Note:}\td{colspan=3}{\input{w.NOTE}{46}} + } + } +

+ \button{Register this User} + } +} +\onpost{ + \if(\T.EMAIL cnt "@" && \T.EMAIL cnt "."){ + \if{\getuser{\T.EMAIL}}{ + \redirect{\this?RES=USEX} + }{ + \su{\newuser{\CLEARLIST}{\T.EMAIL}{\T.NAME}}{ + \const{T.w.ID}{\user.id}; + \db{PREFS}{\import{@}{T.w.}[LASTMOD=\now]} + \mail.user{Registration at \server.alias}{ + \user.name, welcome to the \server.alias server at + + \server/ + + Your alias is: \user.alias + Your PIN-code is: \user.pin + + Please take a minute or two to go through the pages + and familiarize yourself with the login/logout procedure. + + \server/LOGIN/?alias=\user.alias + + /Admin + } + \redirect{\pwd/admin.htc?ID=\user.id} + }{ + \redirect{\this?RES=ERR} + } + } + }{ + \redirect{\this?RES=BEM} + } +} -- cgit v1.2.3