diff options
| author | Christopher Burger <burgerc@freeside.biz> | 2018-09-07 10:55:19 -0400 |
|---|---|---|
| committer | Christopher Burger <burgerc@freeside.biz> | 2018-09-09 16:50:32 -0400 |
| commit | 150aefab60e1b4c4b66533f644cf67893e4d0659 (patch) | |
| tree | 724e8f57e24e4648bfa49e72c740a47e2bad9f69 /FS | |
| parent | 7bc6903bac6439f2bcfeb7c842779904c4b59e68 (diff) | |
RT# 75817 - fixed saving of password for new contacts, and password validation on dynamicly created rows
Conflicts:
httemplate/edit/elements/edit.html
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/contact.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm index 02c6d0659..fc06ca82b 100644 --- a/FS/FS/contact.pm +++ b/FS/FS/contact.pm @@ -199,8 +199,6 @@ sub insert { } - $error ||= $self->insert_password_history; - if ( $error ) { $dbh->rollback if $oldAutoCommit; return $error; @@ -302,6 +300,15 @@ sub insert { } } + if ( $self->get('password') ) { + my $error = $self->is_password_allowed($self->get('password')) + || $self->change_password($self->get('password')); + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return $error; + } + } + $dbh->commit or die $dbh->errstr if $oldAutoCommit; ''; @@ -817,7 +824,7 @@ sub authenticate_password { $hash eq $check_hash; - } else { + } else { return 0 if $self->_password eq ''; |
