def create_user(username, password, displayname, uid, gid, salt):
    "ユーザーをデータベースに登録"
    hashed = hashed_password(username, password, salt)
    userlist = userlist_key()
    u = UserInfo( parent = userlist,
                  id = username,
                  username = username,
                  password = hashed,
                  displayname = displayname,
                  uid = uid,
                  gid = gid )
    u.put()