Gossamer Forum
Home : Products : DBMan : Customization :

create account using email address as userid

Quote Reply
create account using email address as userid
Hi
I am a novice and so far i have done well with customising dbman, but I want people to use their email address as the user ID, to allow this I have added \.\@\-\_ and changed the amount of characters from 12 to 40 in the db.cgi

but when you get to the main menu and click on any of the following add, view, delete, modify, list all i get

Error: Unauthorized Action

The database program received a command that you are not authorized for.

the permissions are View Add Delete and Modify


What have I missed or why will it not work, If the person uses anything but an email address it works I have listed what I have changed in the db.cgi


In the sub main

elsif ($in{'logoff'}) { &auth_logging('logged off') if ($auth_logging); (-e "$auth_dir/$db_uid") and ($db_uid =~ /^[\A-Za-z0-9\.\@\-\_]+\.\d+$/) and unlink ("$auth_dir/$db_uid");



# Set the script link URL with db and user info for links. Use $db_script_url for forms.
$db_script_link_url = "$db_script_url?db=$db_setup&uid=$db_uid";
if ($uid eq "default") { $db_userid = $uid; }
else { ($db_userid) = $db_uid =~ /([A-Za-z0-9\.\@\-\_]+)\.\d+/; }





In the sub admin_display


$in{'new_username'} and do {
unless ((length($in{'new_username'}) >= 3) and (length($in{'new_username'}) <= 40) and ($in{'new_username'} =~ /^[a-zA-Z0-9\.\@\-\_]+$/)) {
$message = "Invalid username: $in{'new_username'}. Must only contain letters and numbers and be less then 40 and greater then 3 characters.";
last CASE;


In the sub signup

unless ((length($in{'userid'}) >= 3) and (length($in{'userid'}) <= 40) and ($in{'userid'} =~ /^[a-zA-Z0-9\.\@\-\_]+$/)) {
$message = "Invalid userid: $in{'userid'}. Must only contain only letters and be less then 40 and greater then 3 characters.";





Subject Author Views Date
Thread create account using email address as userid mintella 8248 May 5, 2001, 10:06 AM
Thread Re: create account using email address as userid
mintella 8145 May 5, 2001, 10:47 AM
Thread Re: [mintella] create account using email address as userid
seasky 7947 Jul 20, 2008, 2:36 AM
Thread Re: [seasky] create account using email address as userid
LoisC 7970 Jul 20, 2008, 12:42 PM
Thread Re: [LoisC] create account using email address as userid
seasky 7969 Jul 20, 2008, 1:53 PM
Thread Re: [seasky] create account using email address as userid
LoisC 7936 Jul 20, 2008, 7:16 PM
Thread Re: [LoisC] create account using email address as userid
seasky 7950 Jul 20, 2008, 10:56 PM
Thread Re: [seasky] create account using email address as userid
seasky 7941 Jul 20, 2008, 11:53 PM
Thread Re: [seasky] create account using email address as userid
Watts 7936 Jul 23, 2008, 11:10 AM
Post Re: [Watts] create account using email address as userid
seasky 7901 Jul 24, 2008, 6:45 AM