# evennia.contrib.base_systems.email_login.email_login

Email-based login system

Evennia contrib - Griatch 2012

This is a variant of the login system that requires an email-address instead of a username to login.

This used to be the default Evennia login before replacing it with a more standard username + password system (having to supply an email for some reason caused a lot of confusion when people wanted to expand on it. The email is not strictly needed internally, nor is any confirmation email sent out anyway).

Installation is simple:

To your settings file, add/edit settings as follows:

    CMDSET_UNLOGGEDIN = "contrib.base_systems.email_login.email_login.UnloggedinCmdSet"
    CONNECTION_SCREEN_MODULE = "contrib.base_systems.email_login.connection_screens"

That’s it. Reload the server and try to log in to see it.

The initial login “graphic” will still not mention email addresses after this change. The login splashscreen is taken from strings in the module given by settings.CONNECTION_SCREEN_MODULE.

class `evennia.contrib.base_systems.email_login.email_login.``CmdUnconnectedConnect`(**kwargs)

  Bases: `evennia.commands.default.muxcommand.MuxCommand`

  Connect to the game.

  Usage (at login screen):

    connect <email> <password>

  Use the create command to first create an account before logging in.

  `key` = 'connect'
  `aliases` = ['co', 'con', 'conn']
  `locks` = 'cmd:all()'
  `func`()

    Uses the Django admin api. Note that unlogged-in commands have a unique position in that their func() receives a session object instead of a source_object like all other types of logged-in commands (this is because there is no object yet before the account has logged in)

  `help_category` = 'general'
  `lock_storage` = 'cmd:all()'
  `search_index_entry` = {'aliases': 'co con conn', 'category': 'general', 'key': 'connect', 'no_prefix': ' co con conn', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}

class `evennia.contrib.base_systems.email_login.email_login.``CmdUnconnectedCreate`(**kwargs)

  Bases: `evennia.commands.default.muxcommand.MuxCommand`

  Create a new account.

  Usage (at login screen):

    create “accountname” <email> <password>

  This creates a new account account.

  `key` = 'create'
  `aliases` = ['cre', 'cr']
  `locks` = 'cmd:all()'
  `parse`()

    The parser must handle the multiple-word account name enclosed in quotes:

    > connect “Long name with many words” my@myserv.com mypassw

  `func`()

    Do checks and create account

  `help_category` = 'general'
  `lock_storage` = 'cmd:all()'
  `search_index_entry` = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'no_prefix': ' cre cr', 'tags': '', 'text': '\n Create a new account.\n\n Usage (at login screen):\n create "accountname" <email> <password>\n\n This creates a new account account.\n\n '}

class `evennia.contrib.base_systems.email_login.email_login.``CmdUnconnectedQuit`(**kwargs)

  Bases: `evennia.commands.default.muxcommand.MuxCommand`

  We maintain a different version of the quit command here for unconnected accounts for the sake of simplicity. The logged in version is a bit more complicated.

  `key` = 'quit'
  `aliases` = ['q', 'qu']
  `locks` = 'cmd:all()'
  `func`()

    Simply close the connection.

  `help_category` = 'general'
  `lock_storage` = 'cmd:all()'
  `search_index_entry` = {'aliases': 'q qu', 'category': 'general', 'key': 'quit', 'no_prefix': ' q qu', 'tags': '', 'text': '\n We maintain a different version of the `quit` command\n here for unconnected accounts for the sake of simplicity. The logged in\n version is a bit more complicated.\n '}

class `evennia.contrib.base_systems.email_login.email_login.``CmdUnconnectedLook`(**kwargs)

  Bases: `evennia.commands.default.muxcommand.MuxCommand`

  This is an unconnected version of the look command for simplicity.

  This is called by the server and kicks everything in gear. All it does is display the connect screen.

  `key` = '__unloggedin_look_command'
  `aliases` = ['l', 'look']
  `locks` = 'cmd:all()'
  `func`()

    Show the connect screen.

  `help_category` = 'general'
  `lock_storage` = 'cmd:all()'
  `search_index_entry` = {'aliases': 'l look', 'category': 'general', 'key': '__unloggedin_look_command', 'no_prefix': ' l look', 'tags': '', 'text': '\n This is an unconnected version of the `look` command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}

class `evennia.contrib.base_systems.email_login.email_login.``CmdUnconnectedHelp`(**kwargs)

  Bases: `evennia.commands.default.muxcommand.MuxCommand`

  This is an unconnected version of the help command, for simplicity. It shows a pane of info.

  `key` = 'help'
  `aliases` = ['h', '?']
  `locks` = 'cmd:all()'
  `func`()

    Shows help

  `help_category` = 'general'
  `lock_storage` = 'cmd:all()'
  `search_index_entry` = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}