- $message = trans('errors.social_account_not_used', ['socialAccount' => title_case($socialDriver)]);
- if (setting('registration-enabled')) {
- $message .= trans('errors.social_account_register_instructions', ['socialAccount' => title_case($socialDriver)]);
+ $message = trans('errors.social_account_not_used', ['socialAccount' => $titleCaseDriver]);
+ if (setting('registration-enabled') && config('auth.method') !== 'ldap' && config('auth.method') !== 'saml2') {
+ $message .= trans('errors.social_account_register_instructions', ['socialAccount' => $titleCaseDriver]);