Gossamer Forum
Home : Products : DBMan : Installation :

Error after adding UID

Quote Reply
Error after adding UID
I decided to add a hidden field called UID which is use as the db_key. However after doing so, when I log in as guest, which only has permission for viewing, I can't preform serch or view. It always says Search failed.

I have corrected my default.db file to include the UID value. I verified that using my admin login.

Can you help me?

To help you, I have renamed the files as:

http://julianng.hypermart.net/default.txt
http://julianng.hypermart.net/html.txt

Thanks.

------------------
Julian
Quote Reply
Re: Error after adding UID In reply to
Your immediate problem is the following:

Code:
$auth_view_own = 1;

With that setting, users can only view the records they have added. A default viewer will not be able to view any records, since default users are not allowed to add.

I don't know if the user 'guest' has any records in the database or not. If not, that would account for that user not being able to view any records either.

It might be better not to call your new field "UID." I know that Perl sees different letter cases as different variables, but it's just too close to the "uid" that the script uses to pass the logged-in user name from one form or link to another. I would use a different name.

You have the UID field set up as the $db_key field and as a counter field ($db_key_track = 1 Wink. But you also have the UID field set up as an 'alpha' field type. A counter variable usually should be field type 'numer.'

You also have the $mailprog and $admin_email variables assigned twice. You only need to have them once.


------------------
JPD






Quote Reply
Re: Error after adding UID In reply to
Thanks a lot. The problem was just like what you said. This database script is great!



------------------
Julian