Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Add a user to the current authentication model.

This will also get update the configuration with the information
needed to recreate itself.

:param name: The name of the user to add.
:type name: ``str``
:param password: The password to use for this user.
:type password: ``str``
:raises: ``KeyError`` if the name exists

        def addUser(name, password):
    """
    Add a user to the current authentication model.

    This will also get update the configuration with the information
    needed to recreate itself.

    :param name: The name of the user to add.
    :type name: ``str``
    :param password: The password to use for this user.
    :type password: ``str``
    :raises: ``KeyError`` if the name exists

    """
    global authModel
    users = config.getSettings("auth")["users"]

    if name in users:
        raise KeyError, str(name)+" already exists"

    users[name] = password
    # Don't need a complete refresh to add one user
    if authModel is None:
        refresh()
    else:
        addUserToModel(name, password)
        


src/r/e/reef-HEAD/reef/startup.py   reef(Download)
    password = getpass("Please give a passkey for accessing the interface (Blank for none): ")
    if password:
        authentication.addUser(pb.app_user, password)
    else:
        authentication.clear()