Gossamer Forum
Home : Products : DBMan : Customization :

Send to add_form

Quote Reply
Send to add_form
I am the using the mod below to send users who sign-up for the first time to the add_form page.
The problem I am having is: the users are being sent to the add_form page everytime they log in. I thought this mod was suppose to send them to the main page after they had add their record already.

####### sends user to add_form after they sign up and login for the first time - #####
unless ($per_admin) {
$in{'Userid'} = $db_userid;
my ($status, @hits) = &query("mod");
undef %in;
unless ($status eq 'ok') {
&html_add_form;
return;
}
}
##########


Quote Reply
Re: Send to add_form In reply to
Just a guess but are you sure you have:

$auth_user_field = 0;

set to the correct field for your userid in your .cfg file?

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Send to add_form In reply to
Hello LoisC, I am so glad that you respond to my post, especially since I got the mod from your web site.
I dod not have a userid field in my .cfg file and my $auth_user_field = -1;
What am I not doing correct?

Quote Reply
Re: Send to add_form In reply to
Without using a userid field how are you associating the record to your users?

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Send to add_form In reply to
OK, I guess that is the mistake I made. Do I now have to change my html_record and html_record_form to include a Userid field for my users to fill in their userid?
Give me some advise on what I should do now?

Quote Reply
Re: Send to add_form In reply to
Well, the purpose of that snippet of code is to check to see if a user already has a record .. if not send them to the add form. So i would think it necessary for your database to have a field for the user.

You may want to check the FAQ below and look under the section "Admin" and see if you can find other options or solutions to accomplish what you want to do.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/