replaced return; with return undef;

This commit is contained in:
JT Smith 2008-01-24 21:58:15 +00:00
parent ffa90c5fbd
commit fa09c41598
113 changed files with 287 additions and 286 deletions

View file

@ -559,8 +559,8 @@ sub newByEmail {
my $email = shift;
my ($id) = $session->dbSlave->quickArray("select userId from userProfileData where email=?",[$email]);
my $user = $class->new($session, $id);
return if ($user->userId eq "1"); # visitor is never valid for this method
return unless $user->username;
return undef if ($user->userId eq "1"); # visitor is never valid for this method
return undef unless $user->username;
return $user;
}
@ -588,8 +588,8 @@ sub newByUsername {
my $username = shift;
my ($id) = $session->dbSlave->quickArray("select userId from users where username=?",[$username]);
my $user = $class->new($session, $id);
return if ($user->userId eq "1"); # visitor is never valid for this method
return unless $user->username;
return undef if ($user->userId eq "1"); # visitor is never valid for this method
return undef unless $user->username;
return $user;
}
@ -617,7 +617,7 @@ sub profileField {
my $db = $self->session->db;
if (!exists $self->{_profile}{$fieldName} && !$self->session->db->quickScalar("SELECT COUNT(*) FROM userProfileField WHERE fieldName = ?", [$fieldName]) ) {
$self->session->errorHandler->warn("No such profile field: $fieldName");
return;
return undef;
}
if (defined $value) {
$self->uncache;