-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not empty email, realname when updating with LDAP #1832
Do not empty email, realname when updating with LDAP #1832
Conversation
Looks good, didn't test. |
Yes I noticed that too, but for sure it can't be caused by the change I committed. The logs show a lot of errors like this: PHP Deprecated: Return type of PHPUnit_Framework_TestCase::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/travis/build/mantisbt/mantisbt/vendor/phpunit/phpunit/src/Framework/TestCase.php on line 307 So maybe it's because I changed the PR's target branch from master to master-2.25 after submitting it. |
Returns true if given PHP extension is loaded, dies if not. Use the new function to replace an if statement checking for 'mbstring'. This will avoid code duplication, as we need to introduce the same check for 'ldap' extension to fix issue #30771.
The check is now performed globally in core.php, so it is no longer necessary here. Also remove the now-unused ERROR_LDAP_EXTENSION_NOT_LOADED constant and corresponding error message from language strings. Fixes #30771
A single function call replaces several individual variable assignments.
When using LDAP with $g_use_ldap_email = ON or $g_use_ldap_realname = ON and updating a user's record from manage_user_edit_page.php, the email or realname fields were set to blank if the LDAP connection failed or the user was not found in the directory. This fixes the problem by keeping the old field value when the ldap_email() or ldap_realname_from_username() functions return false. Fixes #24720
8317a5d
to
010f60c
Compare
Well I force-pushed the branch and now it's all succeeded. Go figure. |
Fixes #24720