]> andersk Git - sql-web.git/blame - signup.php
git-svn-id: svn://presbrey.mit.edu/php/lib@120 a142d4bd-2cfb-0310-9673-cb33a7e74f58
[sql-web.git] / signup.php
CommitLineData
dc478ec8 1<?php
79ffa771
JP
2/*
3 (c) 2005 Joe Presbrey
4*/
dc478ec8
JP
5
6require_once('mitsql.cfg.php');
7require_once('mitsql.lib.php');
8
9if (!isSSL())
1389493c 10 redirect('signup',true);
dc478ec8
JP
11
12if (isLoggedIn()) {
13
14 redirect('index');
15
16} else {
50855303
JP
17
18 if (is_null($SSLCred)) {
19 $err[] = 'Please install a valid certificate.';
20 } else {
1389493c 21 if (isPost() && $LoginSSL->canSignup()) {
88b7d384
JP
22 if (empty($i_p1)) {
23 $err[] = 'Your password may not be blank.';
24 } elseif ($i_p1 != $i_p2) {
25 $err[] = 'Your confirmation password does not match.';
26 } else {
27 $u = new User($LoginSSL->getUserId());
28 $u->signup($i_p1);
29 $LoginSSL->refresh();
88b7d384
JP
30 redirect('login', true);
31 }
32 } elseif (isPost()) {
33 $err[] = 'You may not signup.';
1389493c 34 }
dc478ec8 35 }
dc478ec8
JP
36}
37
38include 'tpl/signup.php';
39
40?>
This page took 0.122493 seconds and 5 git commands to generate.