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";
27 use CGI qw (:standard);
29 my $userid = param('userid');
30 my $fullname = param('fullname');
31 my $email = param('email');
32 my $password = param('password');
33 my $repeated_password = param('repeated_password');
34 my $mapspop = param('MAPSPOP');
35 my $history = param('history');
36 my $days = param('days');
37 my $dates = param('dates');
38 my $tag_and_forward = param('tag_and_forward');
50 NavigationBar $userid;
52 print h2 {-align => 'center',
53 -class => 'error'}, 'Error: ' . $errmsg;
61 # Check required fields
63 MyError 'You must specify a userid!';
66 MyError 'You must specify an email address!';
68 if ($password eq '') {
69 MyError 'You must specify a password!';
71 if ($fullname eq '') {
72 MyError 'You must specify your full name!';
75 # Password field checks
76 if (length $password < 6) {
77 MyError 'Password must be longer than 6 characters!';
79 if ($password ne $repeated_password) {
80 MyError 'Passwords do not match';
87 password => $password,
91 MyError 'Username already exists';
99 'Tag&Forward' => $tag_and_forward,
102 $status = AddUserOptions($userid, %options);
105 print redirect ("/maps/?errormsg=User account \"$userid\" created.<br>You may now login");
106 } elsif ($status == 1) {
107 MyError "Username \"$userid\" already exists";
109 MyError "Unable to add useropts for \"$userid\"";