#4760 - SU issue with "Guest" on multilingual sites

This is a spacer post for a website comment topic. The content this topic relates to: #4760 - SU issue with "Guest" on multilingual sites
Are you implying that you expect keep_su=Visiteur to work? SU is literally just expecting a username, so the guest user would have to be named Visiteur in the database.
Actually I think you are saying you are seeing the Guest user referred to as Visiteur somewhere, so you expect this is the username and you can SU to it?
Perhaps this is a valid point. Composr is mapping the username by language pack and ignoring what is in the DB, so it is inconsistent in its handling at least.

Automated response: Consistently with the written name of the Guest user

In some parts of Composr we use the 'GUEST' language string, and others we use the field value from the guest member row in the f_members table.
That is fine, but it means that we need to automatically recognise the contents of the 'GUEST' language string as guest (in whatever language is currently active) as that guest user, as well as the value from the database.

I typed Guest in the SU box and it says "Visiteur" does not exist when in French. I never tried using Visiteur or any of the other translations of Guest in the SU box as it already told me these accounts do not exist. Thanks for the fix.

Ah, so actually the bug wasn't as trivial as I thought due to this code...

if ($ks == do_lang('GUEST', null, null, null, fallback_lang())) {
$ks = do_lang('GUEST');
}

It maps "Guest" to the equivalent in the current user's language pack and tries to look up that in the database, which will only succeed if the Guest user in the database was initially created with the language the current user is on.

My fix does resolve the issue, as well as the issue I thought this was about.
0 guests and 0 members have recently viewed this.