Home : General : Perl Programming :

General: Perl Programming: Re: [delicia] Can't modify constant item in scalar assignment: Edit Log

Here is the list of edits for this post
Re: [delicia] Can't modify constant item in scalar assignment
Hi,

You sure you don't need something like this? (I'm not sure the code you have is actually doing what you want)

Code:
sub auth_valid_user {
# -------------------------------------------------------------------
# This function returns 1 if the user/pass combo is valid, 0/undef
# otherwise.
#
my $args = shift;
my $table = $args->{Table};
my $email = $args->{Email};
# 8/06/2010
if ($email) {
if ($DB->table($table)->count ( { Email => $args->{Email}, Password => $args->{Password} } ) > 0) {
return $DB->table($table)->select ( ['Username'], { Email => $args->{Email}, Password => $args->{Password} } )->fetchrow;
}
}
###
return $DB->table($table)->select ( ['Username'], { Username => $args->{Username}, Password => $args->{Password} } )->fetchrow;
}

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Aug 7, 2010, 6:39 AM

Edit Log: