Fix broken LDAP based login
Fix broken LDAP based login

Fixed that LDAP based login failed, if wiki used two or more
domains.

Bug: T90149
Change-Id: I819137c4592cf43608904a4d30a981d965dee1c3

hasteur/g13bot_tools_new,happy5214/pywikibot-core,wikimedia/pywikibot-core,Darkdadaah/pywikibot-core,hasteur/g13bot_tools_new,magul/pywikibot-core,wikimedia/pywikibot-core,jayvdb/pywikibot-core,happy5214/pywikibot-core,PersianWikipedia/pywikibot-core,npdoty/pywikibot,Darkdadaah/pywikibot-core,jayvdb/pywikibot-core,hasteur/g13bot_tools_new,magul/pywikibot-core,npdoty/pywikibot