Gossamer Forum
Home : Products : DBMan : Customization :

How do you modify your own?

Quote Reply
How do you modify your own?
I have set up dbman so that anyone can search the database but the user can only modify their own record. I went to the admin screens and setup a new user and password. But when I go to modify a particular record, dbman will not let me: it says no matching records--when I know the record is in the database. How does dbman know which record to let me modify? What is the variable that will tell dbman that I can modify a particular record and and not any other.
Quote Reply
Re: How do you modify your own? In reply to
You have to do the following:

1) Create a field called "Userid" in the db_def area.

2) Set up the following permissions:

Code:
$auth_no_authentication = 0;
$auth_time = 21600;
$auth_logging = 1;
$auth_allow_default = 1;
@auth_default_permissions = (1,0,0,0,0);
$auth_signup = 1;
@auth_signup_permissions = (0,1,1,1,0);
$auth_modify_own = 1,0,0,0;
$auth_view_own = 0;
$auth_user_field = Fieldnumber;

Replace the Fieldnumber with the number of your Userid field.

Also, you might want to check out the DBMAN-ual site created and maintained by JPDeni, which is located at

www.jpdeni.com/dbman/

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: How do you modify your own? In reply to
Does the numbering of the fields begin at 0 or 1
Quote Reply
Re: How do you modify your own? In reply to
The numbering of fields begin with 0.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: How do you modify your own? In reply to
Thank you for your prompt response. But here is the problem I am having exactly. I want anyone to view the records but only the owner to modify them. So lets say the owner logs into the program. Presently, the owner could click on the "view" link and type in their userid and then dbman will find them. But if the owner clicks the "modify" button and does the exact same thing, then the program says it cannot find any records. Why?

Here is my configuration.

$auth_no_authentication = 0;
$auth_time = 21600;
$auth_logging = 1;
$auth_allow_default = 1;
@auth_default_permissions = (1,0,0,0,0);
$auth_signup = 1;
@auth_signup_permissions = (1,0,0,1,0);
$auth_modify_own = 1,0,0,0;
$auth_view_own = 0;
$auth_user_field = 1; #correct field

What do I need to change?
Quote Reply
Re: How do you modify your own? In reply to
You also have to make sure that you have set the $db_key and $db_key_track field set correctly, like the following:

Code:
$db_key = 'ID';
$db_key_track = 1;

1 = on
0 = off

for the db_key_track variable.

If that is okay, then change the following codes:

Code:
$auth_view_own = 0;

to

Code:
$auth_view_own = 1;

If that doesn't work, carefully read through the Permission section of the site I gave you before.

Hope this helps.

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us