Topic-icon Discord- please enter your name.

Active Subscriptions:

None
3 years 7 months ago #66684 by skyiron
I believe the issue described below is probably with EasySocial and not with JFBConnect, but I will report it here too just in case you have encountered the problem before.

I'm having trouble registering users who log in using Discord. I am using JFBConnect and EasySocial and Discord. When a user tries to register via Discord it fails with the following error -

Error
Please enter your name.


I have seen this error before with GitHub and Yahoo, but in both cases, the user registering did not have a name entered in their profile. The issue was solved by having the user enter their name on their GitHub profile and Yahoo profile.

Unfortunately Discord does not provide name information for use with registration. Knowing this, I have tried to make the name field optional in EasySocial by going to Administrator -> EasySocial -> Custom Fields -> Workflows -> MyRegistrationWorkflow and changing the name field to optional, but the error continues to occur. For debugging, I even tried deleting the name field, but EasySocial did not allow it.

Is there a way that I can allow Registration to complete even though the name information is not available from Discord?

Please note that I am using Quick Registration Mode and JFBConnect is set to use EasySocial as the Registration component.

I've also selected the option "Fallback to username" for the Name field.
The topic has been locked.
Support Specialist
3 years 7 months ago #66687 by alzander
I'm not sure offhand what specific field EasySocial is trying to fill.. if they have separate first name & last name fields or just a generic full name. What you may want to try is the edit below to generate a name for the user based on what we have from Discord.

Edit the /plugins/jfbconnect/provider_discord/profile/discord.php file. Around line 84, you should see:
else
        {
//            if ($path == 'full_name' || $path == 'first_name')
//                $data = parent::get('display_name');
        }
Update that to:
else
        {
            if ($path == 'full_name' || $path == 'first_name')
                $data = parent::get('username');
        }
That will return their discord username for either the full_name or first_name fields as EasySocial requests them. You can see all the fields available for a Discord user profile below:
discord.com/developers/docs/resources/user

I hope that helps, but let us know if that gets you going.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
3 years 7 months ago #66691 by skyiron
That solved the problem. Thank you Alex!
Will the above changes get added to JFBConnect or will I need to ensure it is patched myself?
The topic has been locked.
Support Specialist
3 years 7 months ago #66692 by alzander
No, no, no.. we wouldn't leave you hanging. We'll make sure this is incorporated into the next release.

Out of curiosity, what's your preference for first name or full name? Above, we use the Discord username, which I think makes sense. Those aren't unique across Discord, but are the names the user chose. We could use the actual Discord usertag, which is like alzander1234 (the 4 numbers after). I don't think that's necessary, but curious as to your thoughts.

Either way, this is on our to-do list and will be in the next release we put out.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
3 years 7 months ago #66696 by skyiron
That's a relief! Thank you.

To be honest, I don't really have a preference. Using the Discord username might be better, but I suppose that depends on the default behaviour of EasySocial/JFBConnect for when a user has the same name as one already in the system (from memory I think it just adds a number to the name.) If I were a user and I had a number added to my name then I would probably like it to be the same number as used by Discord. Maybe? Maybe not. I'm still undecided.
The topic has been locked.
Active Subscriptions:

None
3 years 5 months ago #66805 by serg
Good afternoon!
Please tell me, where can I get a plug-in for authorization via discord? in the version of the site to which I was given access on the local server - there is no such plugin, but it is very necessary
The topic has been locked.
Support Specialist
3 years 5 months ago #66806 by alzander
Serg,
Discord authentication is part of our Gaming Add-On pack for JFBConnect, which include Discord, Twitch and Blizzard authentication. You (or your client) can purchase from the link below:
www.sourcecoast.com/product-list

I hope that helps, but should you need anything else, just let me know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
3 years 5 months ago #66825 by serg

alzander wrote: I'm not sure offhand what specific field EasySocial is trying to fill.. if they have separate first name & last name fields or just a generic full name. What you may want to try is the edit below to generate a name for the user based on what we have from Discord.

Edit the /plugins/jfbconnect/provider_discord/profile/discord.php file. Around line 84, you should see:

else
        {
//            if ($path == 'full_name' || $path == 'first_name')
//                $data = parent::get('display_name');
        }
Update that to:
else
        {
            if ($path == 'full_name' || $path == 'first_name')
                $data = parent::get('username');
        }
That will return their discord username for either the full_name or first_name fields as EasySocial requests them. You can see all the fields available for a Discord user profile below:
discord.com/developers/docs/resources/user

Hello!
I also use discord registration. Unfortunately, the site does not register a new user, but tries to force him to enter a username and password and asks if he was registered earlier (he certainly was not). In the settings it is worth registering automatically.
Can not understand:
discord not returning email?
or is it not configured by default to get a name from the discord user and I need to take your advice from the quote?

In fact, I need to create users with a name equal to the ID from the discord when registering.

The topic has been locked.
Active Subscriptions:

None
3 years 5 months ago #66827 by serg
the issue is resolved you are cool thanks
I set it up just on the advice of id
The topic has been locked.