Skip to content

Instantly share code, notes, and snippets.

@cym0n
Created July 21, 2013 22:05
sub login_valid
{
my $user = shift;
my $password = shift;
my $hashed = md5_hex($password);
my $rs = schema->resultset('User')->find({'user' => $user, 'password' => $hashed});
if($rs)
{
return 1;
}
else
{
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment