File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -567,10 +567,10 @@ public function findUsersByUsername($uid) {
567567
568568 $ escapedUid = $ this ->access ->escapeFilterPart ($ uid );
569569 $ attrFilters = [];
570+ $ converterHub = ConverterHub::getDefaultConverterHub ();
570571 foreach ($ usernameAttrs as $ attr ) {
571- if ($ attr === 'objectguid ' || $ attr === 'guid ' ) {
572- // needs special formatting because we need to send as binary data
573- $ attrFilters [] = "{$ attr }= " . $ this ->access ->formatGuid2ForFilterUser ($ uid );
572+ if ($ converterHub ->hasConverter ($ attr )) {
573+ $ attrFilters [] = "{$ attr }= " . $ converterHub ->str2filter ($ attr , $ uid );
574574 } else {
575575 $ attrFilters [] = "{$ attr }= {$ escapedUid }" ;
576576 }
@@ -609,11 +609,13 @@ public function findUsersByUsername($uid) {
609609 */
610610 private function getValueFromEntry ($ ldapEntry , $ attrs ) {
611611 $ chosenValue = null ;
612+ $ converterHub = ConverterHub::getDefaultConverterHub ();
613+
612614 foreach ($ attrs as $ attr ) {
613615 if (isset ($ ldapEntry [$ attr ][0 ])) {
614616 $ chosenValue = $ ldapEntry [$ attr ][0 ];
615- if ($ attr === ' objectguid ' || $ attr === ' guid ' ) {
616- $ chosenValue = Access:: binGUID2str ( $ chosenValue );
617+ if ($ converterHub -> hasConverter ( $ attr) ) {
618+ $ chosenValue = $ converterHub -> bin2str ( $ attr , $ chosenValue );
617619 }
618620 break ;
619621 }
You can’t perform that action at this time.
0 commit comments