Gossamer Forum
Home : Products : DBMan : Customization :

forcing user to add record

Quote Reply
forcing user to add record
I have implimented user is forced to add record on signup, but when i login as admin its forcing add record.
I only use an admin login to do modifications on records and delete them.
Can i have it so the admin login isnt forced to add a record?



Quote Reply
Re: forcing user to add record In reply to
Add another condition into the codes using $per_admin.

Like:

Code:

if ($per_admin) {
&html_home;
}


Regards,

Eliot Lee
Quote Reply
Re: forcing user to add record In reply to
this is the code, im not sure on how to add the extra info

$in{$db_cols[$auth_user_field]} = $db_userid;
$in{'ww'} = 1;
$in{'cs'} = 1;
my ($status,@hits) = &query("view");
unless ($status eq 'ok') {
$in{'add_form'} = 1;
&html_add_form;
return;
}



Quote Reply
Re: forcing user to add record In reply to
Can anyone help me out with this one

please :)

Quote Reply
Re: forcing user to add record In reply to
Yep try,
$in{$db_cols[$auth_user_field]} = $db_userid;
$in{'ww'} = 1;
$in{'cs'} = 1;
my ($status,@hits) = &query("view");
unless ($status eq 'ok') {
$in{'add_form'} = 1;
if ($per_admin) {
&html_home;
}
else {
&html_add_form;
}
return;
}

Bob
http://totallyfreeads.com

Quote Reply
Re: forcing user to add record In reply to
doesnt seem to work
admin login doesnt do anything ... just seems to stall pc



Quote Reply
Re: forcing user to add record In reply to
Ok try,

unless ($per_admin) {
$in{$db_cols[$auth_user_field]} = $db_userid;
$in{'ww'} = 1;
$in{'cs'} = 1;
my ($status,@hits) = &query("view");
unless ($status eq 'ok') {
$in{'add_form'} = 1;
&html_add_form;
return;
}
}

Bob
http://totallyfreeads.com

Quote Reply
Re: forcing user to add record In reply to
thanks bob that one worked a treat :)

is it possible to also have it if a field equals something they dont get forced to add a record?