v5 Develop Fixed: LDAP Settings Password being updated when field is empty (#6384)

* Fixed missing oauth tables during setup.

* Fixed password saving

Previous Input::has always returned true, even if password was an empty string.
This commit is contained in:
Wes Hulette 2018-11-01 16:36:30 -04:00 committed by snipe
parent ea91d59ffc
commit 0730685c29

View file

@ -869,7 +869,7 @@ class SettingsController extends Controller
$setting->ldap_server = $request->input('ldap_server');
$setting->ldap_server_cert_ignore = $request->input('ldap_server_cert_ignore', false);
$setting->ldap_uname = $request->input('ldap_uname');
if (Input::has('ldap_pword')) {
if ($request->input('ldap_pword') !== '') {
$setting->ldap_pword = Crypt::encrypt($request->input('ldap_pword'));
}
$setting->ldap_basedn = $request->input('ldap_basedn');