2 ################################################################################
4 # File: $RCSfile: signup.cgi,v $
5 # Revision: $Revision: 1.1 $
6 # Description: Sign up a MAPS user
7 # Author: Andrew@DeFaria.com
8 # Created: Mon Jan 16 20:25:32 PST 2006
9 # Modified: $Date: 2013/06/12 14:05:47 $
12 # (c) Copyright 2000-2006, Andrew@DeFaria.com, all rights reserved.
14 ################################################################################
20 local $0 = $FindBin::Script;
22 use lib "$FindBin::Bin/../lib";
23 use lib "$FindBin::Bin/../../lib";
28 use CGI qw (:standard);
30 my $userid = param('userid');
31 my $fullname = param('fullname');
32 my $email = param('email');
33 my $password = param('password');
34 my $repeated_password = param('repeated_password');
35 my $mapspop = param('MAPSPOP');
36 my $history = param('history');
37 my $days = param('days');
38 my $dates = param('dates');
39 my $tag_and_forward = param('tag_and_forward');
51 NavigationBar $userid;
53 print h2 {-align => 'center',
54 -class => 'error'}, 'Error: ' . $errmsg;
62 # Check required fields
64 MyError 'You must specify a userid!';
67 MyError 'You must specify an email address!';
69 if ($password eq '') {
70 MyError 'You must specify a password!';
72 if ($fullname eq '') {
73 MyError 'You must specify your full name!';
76 # Password field checks
77 if (length $password < 6) {
78 MyError 'Password must be longer than 6 characters!';
80 if ($password ne $repeated_password) {
81 MyError 'Passwords do not match';
88 password => $password,
92 MyError 'Username already exists';
100 'Tag&Forward' => $tag_and_forward,
103 $status = AddUserOptions($userid, %options);
106 print redirect ("/maps/?errormsg=User account \"$userid\" created.<br>You may now login");
107 } elsif ($status == 1) {
108 MyError "Username \"$userid\" already exists";
110 MyError "Unable to add useropts for \"$userid\"";