prevent excessive checks for profile field existence
This commit is contained in:
parent
f5f5b91cdd
commit
82d7ae944e
1 changed files with 1 additions and 1 deletions
|
|
@ -667,7 +667,7 @@ sub profileField {
|
||||||
my $fieldName = shift;
|
my $fieldName = shift;
|
||||||
my $value = shift;
|
my $value = shift;
|
||||||
my $db = $self->session->db;
|
my $db = $self->session->db;
|
||||||
if (!$self->session->db->quickScalar("SELECT COUNT(*) FROM userProfileField WHERE fieldName = ?", [$fieldName])) {
|
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");
|
$self->session->errorHandler->warn("No such profile field: $fieldName");
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue