I use electroserver for my game development and i need to understand how the db login mysql example in the site works.. Because in 2 places they have called the controller.registerNewUser function (in dbloginhandler.java and databaseplugin.java)..im unable to trace the execution so please help me..
Share
I suggest that you read this tutorial first.
In
DbLoginMySQL, yourExtension.xmlwill haveuseTwoStepLoginset tofalse, so if a user registers it will be done inDBLoginHandler.java, which then callsController.registerNewUser. In the similarTwoStepLoginexample,useTwoStepLoginis set totrue, and any registration is done by a plugin request toDatabasePlugin.Originally the two examples were going to be a single example, with explanation of how to switch from one configuration to another by editing
Extension.xml. In testing we decided to make them two separate examples, and add the example room plugin to theTwoStepLogin, to show how a game can check that a user hasn’t tried to bypass the second login step.