raghavneon
raghavneon

Reputation: 3

Electroserver Db Extension

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..

Upvotes: 0

Views: 179

Answers (1)

Teresa Carrigan
Teresa Carrigan

Reputation: 698

I suggest that you read this tutorial first.

In DbLoginMySQL, your Extension.xml will have useTwoStepLogin set to false, so if a user registers it will be done in DBLoginHandler.java, which then calls Controller.registerNewUser. In the similar TwoStepLogin example, useTwoStepLogin is set to true, and any registration is done by a plugin request to DatabasePlugin.

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 the TwoStepLogin, to show how a game can check that a user hasn't tried to bypass the second login step.

Upvotes: 2

Related Questions