comparison src/ur/openidUser.ur @ 25:c560ec5bf514

More flexibility in placement of login form and other similar stuff
author Adam Chlipala <adam@chlipala.net>
date Thu, 20 Jan 2011 12:23:44 -0500
parents e5df3d3554d3
children ee97bc0e08fa
comparison
equal deleted inserted replaced
24:b416b9b9dc38 25:c560ec5bf514
259 </xml> 259 </xml>
260 in 260 in
261 cur <- current; 261 cur <- current;
262 here <- currentUrl; 262 here <- currentUrl;
263 case cur of 263 case cur of
264 Some cur => return <xml>Logged in as {[cur]}. <a link={logout ()}>[Log out]</a></xml> 264 Some cur => return {Status = <xml>Logged in as {[cur]}.</xml>,
265 | None => return <xml> 265 Other = <xml><a link={logout ()}>Log out</a></xml>}
266 <form><textbox{#User}/> <submit value="Log In" action={logon (show here)}/></form> 266 | None => return {Status = <xml><form><textbox{#User}/> <submit value="Log In" action={logon (show here)}/></form></xml>,
267 <a link={signup (show here)}>Sign up</a> 267 Other = <xml><a link={signup (show here)}>Sign up</a></xml>}
268 </xml>
269 end 268 end
270 269
271 task periodic 60 = fn () => dml (DELETE FROM session 270 task periodic 60 = fn () => dml (DELETE FROM session
272 WHERE Expires < CURRENT_TIMESTAMP) 271 WHERE Expires < CURRENT_TIMESTAMP)
273 272