From 985adebbccf51c25ebeb049675c78830b98246aa Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Wed, 29 Aug 2018 14:09:58 -0400 Subject: RT# 75817 - updated UI to be more intuitive Conflicts: httemplate/edit/cust_main-contacts.html httemplate/elements/contact.html --- httemplate/misc/xmlhttp-validate_password.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/misc/xmlhttp-validate_password.html') diff --git a/httemplate/misc/xmlhttp-validate_password.html b/httemplate/misc/xmlhttp-validate_password.html index b340170f8..95f1fd33c 100644 --- a/httemplate/misc/xmlhttp-validate_password.html +++ b/httemplate/misc/xmlhttp-validate_password.html @@ -29,14 +29,14 @@ my $validate_password = sub { $result{'syserror'} = 'Invoked without password' unless $password; return \%result if $result{'syserror'}; - if ($arg{'contactnum'}) { + if ($arg{'contactnum'} =~ /^\d+$/) { my $contactnum = $arg{'contactnum'}; $result{'syserror'} = 'Invalid contactnum' unless $contactnum =~ /^\d*$/; return \%result if $result{'syserror'}; my $contact = $contactnum ? qsearchs('contact',{'contactnum' => $contactnum}) - : ''; + : (new FS::contact {}); $result{'error'} = $contact->is_password_allowed($password); } -- cgit v1.2.1