AppController/djinn.rb
# Creates a new user account, with the given username and hashed password.
#
# Args:
#   username: An email address that should be set as the new username.
#   password: A sha1-hashed password that is bound to the given username.
#   account_type: A str that indicates if this account can be logged into
#     by XMPP users.
Creates a new user account, with the given username and hashed password.
Args:
username: An email address that should be set as the new username.
password: A sha1-hashed password that is bound to the given username.
account_type: A str that indicates if this account can be logged into
by XMPP users.
Creates a new user account with the given username and hashed password . Args : username : An email address that should be set as the new username . password : A sha1 - hashed password that is bound to the given username . account_type : A str that indicates if this account can be logged into by XMPP users .
def create_user(username, password, account_type, secret)
    return BAD_SECRET_MSG unless valid_secret?(secret)
    begin
      uac = UserAppClient.new(my_node.private_ip, @@secret)
      return uac.commit_new_user(username, password, account_type)
    rescue FailedNodeException
      Djinn.log_warn("Failed to talk to the UserAppServer while committing " +
        "the user #{username}.")
    end
  end
def create_user ( username , password , account_type , secret ) return BAD_SECRET_MSG unless valid_secret? ( secret ) begin uac = UserAppClient . new ( my_node . private_ip , @@secret ) return uac . commit_new_user ( username , password , account_type ) rescue FailedNodeException Djinn . log_warn ( "Failed to talk to the UserAppServer while committing " + "the user #{username}." ) end end
Creates a new user account, with the given username and hashed password.
Creates a new user account with the given username and hashed password .
username
<not_specific>
password
<not_specific>
account_type
<not_specific>
secret
<not_specific>