Perform the default login procedure.
The standard SmartFoxServer login procedure accepts guest users. If a user logs in with an empty username, the server automatically creates a name for the client using the format guest_n, where n is a progressive number.
Also, the provided username and password are checked against the moderators list (see the SmartFoxServer server-side configuration) and if a user matches it, he is set as a Moderator.
The standard SmartFoxServer login procedure accepts guest users. If a user logs in with an empty username, the server automatically creates a name for the client using the format guest_n, where n is a progressive number.
Also, the provided username and password are checked against the moderators list (see the SmartFoxServer server-side configuration) and if a user matches it, he is set as a Moderator.


NOTE 1:
duplicate names in the same zone are not allowed.
NOTE 2:
for SmartFoxServer Basic, where a server-side custom login procedure can't be implemented due to the lack of extensions support, a custom client-side procedure can be used, for example to check usernames against a database using a php/asp page.
In this case, this should be done BEFORE calling the login method. This way, once the client is validated, the stadard login procedure can be used.
Sends:
SFSEvent..::.OnLoginDelegate
Version:
SmartFoxServer Basic / Pro

The following example shows how to login into a zone.
CopyC#

SFSEvent.onLogin += OnLogin; smartFox.Login("simpleChat", "jack"); public void OnLogin(bool success, string name, string error) { if (success) Debug.WriteLine("Successfully logged in as " + name); else Debug.WriteLine("Zone login error; the following error occurred: " + error); }