This is what I have in default.cfg:
Name => [1, 'alpha', 40, 255, 1, '', ''],
email => [2, 'alpha', 0, 60, 1, '', ''],
icq => [3, 'alpha', 0, 60, 1, '', ''],
URL => [4, 'alpha', 40, 255, 1, 'http://', '^http://'],
stats => [5, 'alpha', 40, 255, 1, '', ''],
Description => [6, 'alpha', '40x3', 500, 0, '', ''],
games => [7, 'alpha', 0, 500, 0, '', ''],
Userid => [8, 'alpha', -1, 15, 0, '', '']
);
# The column name for the database key. Can be any column, but it must be unique!
# You can't have two records with the same key value!
$db_key = 'Userid';
# Track the key? Should DBMan keep a counter of the next key to use? This isn't
# neccessary if you can guarantee that your entry in the key field will be unique
# (i.e. a userid).
$db_key_track = 0;
Plus, these are my admin things:
# The amount of time in seconds that user files are kept in the
# auth directory before the program removes them. 2-6 hours is
# probably a good value.
$auth_time = 21600; # 6 hours (in seconds)
# Enable (1) or disable (0) logging.
$auth_logging = 1;
# Allow a default user? This means you can specify a user via the URL
# and skip the logon process. Use this to allow people to search without
# logging on, but require log in if they want to add/modify/remove etc.
# (1 = "yes", 0 = "no")
$auth_allow_default = 1;
# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,0,0,0,0);
# Allow people to sign up for their own userid/passwords? They will
# recieve default permissions.
$auth_signup = 1;
# Permissions a new signup should get.
@auth_signup_permissions = (1,1,1,1,0);
# Registered users: can modify/delete _only_ own records. For this to make
# sense you should set default off or to 1,0,0,0.
$auth_modify_own = 1;
# Registered users: can view _only_ own records. For this to make sense
# you should turn off default permissions.
$auth_view_own = 0;
# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = 9;
What I want is for users to have to create a new account to login and add only 1 record. Each member can only modify or delete their own record.
I am having problems. I just created my admin, and added my own record. I'm testing it out (I chose to modify my own record, I did List All, and then pressed modify). It gave me this error: Can't find requested record.
Then, I had someone create a login, and add a record. They got this error while trying to login:
Error: Duplicate Key Error
Please help...I've been working on this database for so long, and I'm very thankful I've made it this far.
Code:
%db_def = ( Name => [1, 'alpha', 40, 255, 1, '', ''],
email => [2, 'alpha', 0, 60, 1, '', ''],
icq => [3, 'alpha', 0, 60, 1, '', ''],
URL => [4, 'alpha', 40, 255, 1, 'http://', '^http://'],
stats => [5, 'alpha', 40, 255, 1, '', ''],
Description => [6, 'alpha', '40x3', 500, 0, '', ''],
games => [7, 'alpha', 0, 500, 0, '', ''],
Userid => [8, 'alpha', -1, 15, 0, '', '']
);
# The column name for the database key. Can be any column, but it must be unique!
# You can't have two records with the same key value!
$db_key = 'Userid';
# Track the key? Should DBMan keep a counter of the next key to use? This isn't
# neccessary if you can guarantee that your entry in the key field will be unique
# (i.e. a userid).
$db_key_track = 0;
Plus, these are my admin things:
Code:
$auth_no_authentication = 0; # The amount of time in seconds that user files are kept in the
# auth directory before the program removes them. 2-6 hours is
# probably a good value.
$auth_time = 21600; # 6 hours (in seconds)
# Enable (1) or disable (0) logging.
$auth_logging = 1;
# Allow a default user? This means you can specify a user via the URL
# and skip the logon process. Use this to allow people to search without
# logging on, but require log in if they want to add/modify/remove etc.
# (1 = "yes", 0 = "no")
$auth_allow_default = 1;
# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,0,0,0,0);
# Allow people to sign up for their own userid/passwords? They will
# recieve default permissions.
$auth_signup = 1;
# Permissions a new signup should get.
@auth_signup_permissions = (1,1,1,1,0);
# Registered users: can modify/delete _only_ own records. For this to make
# sense you should set default off or to 1,0,0,0.
$auth_modify_own = 1;
# Registered users: can view _only_ own records. For this to make sense
# you should turn off default permissions.
$auth_view_own = 0;
# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = 9;
What I want is for users to have to create a new account to login and add only 1 record. Each member can only modify or delete their own record.
I am having problems. I just created my admin, and added my own record. I'm testing it out (I chose to modify my own record, I did List All, and then pressed modify). It gave me this error: Can't find requested record.
Then, I had someone create a login, and add a record. They got this error while trying to login:
Error: Duplicate Key Error
Please help...I've been working on this database for so long, and I'm very thankful I've made it this far.