Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Remove username field from basic registration and post username from a plugin

Hello everyone !

I am currently working on a Minecraft forum and I got an issue while editing the registration page.
I would like to remove the username field from registerbasic.php in order to send the username from a plugin.
How could I do this please ?

Emilien

Best Answer

Answers

  • Just a little correction of my question :

    Hello everyone !

    I am currently working on a Minecraft forum and am having issues with the edition of the registration page.
    I'm trying to remove the username field from registerbasic.php in order to send the username from a plugin.
    How may I do this please ?

  • Anyone has a solution ? I found JsConnect but it's stupid to use this if there are easier.

  • R_JR_J Admin

    It was not very clear to me what you are trying to achieve, since you mentioned jsConnect.

    Maybe you have to elaborate some more on this. Are you looking for a single sign on solution?
    Do you already have a user base?
    Do they come from any known software? Maybe someone has connected them before.

  • unixfoxunixfox New
    edited May 2015

    @R_J said:
    It was not very clear to me what you are trying to achieve, since you mentioned jsConnect.

    Maybe you have to elaborate some more on this. Are you looking for a single sign on solution?
    Do you already have a user base?
    Do they come from any known software? Maybe someone has connected them before.

    In my registration page, I'd like to remove the username field. Instead, I'd send the username information using a plugin.
    In this page, the username field is removed. However, if I sign up, there is an error : "Name is required" so I want to send an username value to the form using a plugin, in this case from this API : https://github.com/mattiabasone/MCAuth. The value is from $MCAuth->account['username'].

    There is my plugin : http://pastebin.com/yMh4gNEp.

    PS : Sorry for my bad english, I am French.

  • R_JR_J Admin

    It would be easier to read if you clean up the code from peregrines AddRegistrationQuestion plugin first! :lol:

    Without looking deeper into the code and just judging from the description: could that be of any use for you? http://vanillaforums.org/addon/verifymcuser-plugin

  • unixfoxunixfox New
    edited May 2015

    @R_J said:
    It would be easier to read if you clean up the code from peregrines AddRegistrationQuestion plugin first! :lol:

    Without looking deeper into the code and just judging from the description: could that be of any use for you? http://vanillaforums.org/addon/verifymcuser-plugin

    I use this plugin (http://vanillaforums.org/addon/verifymcuser-plugin) but I would like that the user can not specify the username but his username is defined by a plugin.
    The username value is sent to the registration form via a plugin.

    There is the clean code : http://pastebin.com/yMh4gNEp.

  • unixfoxunixfox New
    edited May 2015

    @R_J

    Thank you, thank you very much! I'll try that.

  • hgtonighthgtonight MVP
    edited May 2015

    This is a terrible idea from a design perspective. You are asking a user to give you their minecraft.net account information to register on your site. What is stopping you from immediately hijacking someone's account?

    You should create a plugin like the facebook or google plugins that wraps the mojang api (details here: http://wiki.vg/Authentication). Then a user connects their account to your system and you only store a foreign key. The user never gives you their credentials and you are assured that they are who they say the are.

    This is actually a really good idea for a plugin.

    EDIT - I just noticed that their API still requires you to supply the password. WTH Mojang?!?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @R_J $Sender->Form->Username = $MCAuth->account['username'] is to set username field but I would like to send username field and not set it.

  • @hgtonight said:
    This is a terrible idea from a design perspective. You are asking a user to give you their minecraft.net account information to register on your site. What is stopping you from immediately hijacking someone's account?

    You should create a plugin like the facebook or google plugins that wraps the mojang api (details here: http://wiki.vg/Authentication). Then a user connects their account to your system and you only store a foreign key. The user never gives you their credentials and you are assured that they are who they say the are.

    This is actually a really good idea for a plugin.

    User can also connect to a server Minecraft to receive a secret code to validate is account. Don't worry the community is based on oc.tc but for French players and the forum will be represented by a member of staff oc.tc.
    I do not store the IDs of Minecraft account, they are only useful for validation.

  • @unixfox said:
    I do not store the IDs of Minecraft account, they are only useful for validation.

    I did not mean to imply you would. I only mean that it would be trivial to do so.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.