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.";
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.";