Issue introduced by
request #9419
Ldap user confirmation login date can be reset (login_confirmation_date.plugin_ldap_user = 0), thus a not new user is redirected to the welcome page while it is not necessary.
The "REPLACE" in the query update the login_confirmation_date to 0.