Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

1.1b2: User.cgi BUG and Forgots..

Quote Reply
1.1b2: User.cgi BUG and Forgots..
Hi Alex,

First of all.. you need to fix the templates and 4 lines in user.cgi

first of all the templates forms have to be fixed.. "User" to "Username" and "Pass" to "Password"..

it doesn't matter on login.html.. but i thought if you were going to change one of them.. just change them both (less confusing)..

the reason you have to change this is cause when you signup.. when it adds the record it uses the names to validate.. so you'll get like Password (can not be blank) all the time..

then you have to change the

Code:
$user = $in->param('User');
$pass = $in->param('Pass');

in user.cgi to

Code:
$user = $in->param('Username');
$pass = $in->param('Password');

there are a pair of those in there.. so get them both..

there is another problem.. when the user doesn't pass the validation.. it gives the error and on the bottom of it the success template.. so you don't have a return or an exit.. something like that..

so you have to do like

Code:
my $ok = $db->add_record ( $in_r );
if ($ok) {
#success
}
else {
#failure
}

jerry
Quote Reply
Re: 1.1b2: User.cgi BUG and Forgots.. In reply to
Thanks! Fixed that up.

Cheers,

Alex