diff options
author | Ivan Kohler <ivan@freeside.biz> | 2018-10-01 12:03:01 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2018-10-01 12:03:01 -0700 |
commit | d5988a9f7a3617de33da3058f2e9f1151b24420e (patch) | |
tree | 3ed8d80cd6a81f160c76c90fcf089e81fe7ffddf /httemplate/misc/xmlhttp-validate_password.html | |
parent | 1ab515df162a76347d8146cae4ff34656cc4bcd3 (diff) | |
parent | b6088672c87e2c5984183326b4c0e2d9bd6c34f6 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/misc/xmlhttp-validate_password.html')
-rw-r--r-- | httemplate/misc/xmlhttp-validate_password.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/httemplate/misc/xmlhttp-validate_password.html b/httemplate/misc/xmlhttp-validate_password.html index 4d9716bb9..c53abe883 100644 --- a/httemplate/misc/xmlhttp-validate_password.html +++ b/httemplate/misc/xmlhttp-validate_password.html @@ -28,14 +28,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); } |