When using login with google, facebook or whatever, if my name is Abhai Sasidharan, the username come as "Abhai Sasidharan". It would make more sense if it was "abhaisasidharan" and "abhaisasidharan1" is the name is already taken.

Comments

abhaisasidharan created an issue. See original summary.

abh.ai’s picture

Issue summary: View changes
abh.ai’s picture

StatusFileSize
new960 bytes

Replaced spaces in username with ''. Works with drupal 8.4.0.

abh.ai’s picture

Assigned: abh.ai » Unassigned
Status: Active » Needs review
gvso’s picture

Status: Needs review » Needs work
+++ b/src/SocialAuthUserManager.php
@@ -658,17 +658,18 @@ class SocialAuthUserManager {
+      $i++;
...
+      $candidate = $base . $i;

I think this has to be after $candidate = $base . $i;

Otherwise, the first value will be 2 since $i is initialized to 1.

MaskyS’s picture

Status: Needs work » Needs review
Issue tags: +Novice
StatusFileSize
new850 bytes

Well, that does stand out... Fixed it :)

  • gvso committed c17b5e9 on 8.x-2.x authored by Kifah Meeran
    Issue #2938362 by abhaisasidharan, Kifah Meeran: Exclude spaces from...
gvso’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.