Gossamer Forum
Home : Products : DBMan : Customization :

1 Customer Record - that only they can view

Quote Reply
1 Customer Record - that only they can view
What I would like to do is setup the dbman database for customers to access only their info.

I create the accounts, (name, password, and info) and then gives them their assigned password.

When they login they are taken directly to their account. They dont see any other records.

_____________

I've spent a bit of time trying to setup the database this way with no luck...

Hoping someone can help me out.

Appreciation in advance...

Darrell

Last edited by:

dmr777: Jan 27, 2003, 5:29 PM
Quote Reply
Re: [dmr777] 1 Customer Record - that only they can view In reply to
This page may help. Cool
Quote Reply
Re: [wysardry] 1 Customer Record - that only they can view In reply to
I have visited the recommended site along with configuring the main 'default.cfg' file and still am getting nowhere.

Still not sure how to setup database to allow a customer only to access one record - being able to go right to the record when they sign on?

Any additional help would be greatly appreciated.

Thanks,

Darrell
Quote Reply
Re: [dmr777] 1 Customer Record - that only they can view In reply to
You would set your permission to not allow default users and for the user to view their own record. Try these settings:

@auth_default_permissions = (0,0,0,0,0);
$auth_signup = 1;
@auth_signup_permissions = (1,0,0,0,0);
$auth_modify_own = 1;
$auth_view_own = 1;
$auth_user_field = 0; ## Be sure to set this correctly to the userid field

-------------

Taken from the FAQ noted below:

Send user to their record directly after logging in

Add the following to the beginning of sub html_home in html.pl:

## send user to their record after login ####
unless ($per_admin) {
$in{$db_key} = $db_userid;
&view_records;
return;
}
############

This assumes that the userid field is the $db_key field (which would make sense, since it seems that each user will have only one record). It also allows you, as admin, to have complete access to all of the functions of the database.
------------------
JPD

The FAQ below is a great resource for finding solutions for working with DBMan.

Unoffical DBMan FAQ
http://redundantcartridge.com/dbman/