Module Expr Str Import alias alias alias alias alias alias Import alias ImportFrom alias alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias Assign NameStore Lambda arguments args NameParam defaults CompareIsNot Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call NameLoad Dict Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num TupleLoad Str ListLoad NameLoad Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num TupleLoad Str ListLoad Lambda arguments args NameParam defaults CompareIs Call NameLoad NameLoad keyword NameLoad NameLoad Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num keyword NameLoad Assign NameStore Call NameLoad Dict Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num TupleLoad Str ListLoad Lambda arguments args NameParam defaults CompareIs Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad NameLoad Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num keyword NameLoad Assign NameStore Call NameLoad Dict Call NameLoad Str Call NameLoad Str Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num TupleLoad Str ListLoad Lambda arguments args NameParam defaults CompareIs Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad NameLoad Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num keyword NameLoad Assign NameStore Call NameLoad Dict Call NameLoad Str Call NameLoad Str Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num TupleLoad Str ListLoad Lambda arguments args NameParam defaults CompareNotEq Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad NameLoad TupleLoad Str ListLoad Lambda arguments args NameParam defaults CompareLt Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num keyword NameLoad Assign NameStore Call NameLoad Dict Call NameLoad Str Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Dict If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Dict Str NameLoad orelse If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Dict Str NameLoad orelse If Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Dict Str Call AttributeLoad AttributeLoad NameLoad attr attr orelse Raise Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str Str NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot Call NameLoad NameLoad keyword NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Dict Str Str NameLoad Dict Str AttributeLoad AttributeLoad NameLoad attr attr keyword Dict Str Dict Str Num keyword NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Dict Assign NameStore Dict Str Str Str Str Num Num Num Num If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Num Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Str Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return CompareEq SubscriptLoad NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad NameLoad NameLoad If BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad Str If CompareEq Call AttributeLoad NameLoad attr Str Str Str body If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad Str Expr Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str NameLoad SubscriptLoad NameLoad Index Str BinOpAdd Str Call AttributeLoad AttributeLoad NameLoad attr attr Return Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str orelse If CompareEq Call AttributeLoad NameLoad attr Str Str Str body Assign NameStore NameLoad If NameLoad body Expr Call NameLoad NameLoad NameLoad orelse Expr Call NameLoad NameLoad NameLoad Assign NameStore Dict Str Str Str Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad orelse Expr Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Str If CompareNotEq SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Raise Call NameLoad Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str NameLoad Dict Str Dict Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str NameLoad Dict Str Dict Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad If BoolOpAnd NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Raise Call NameLoad Str If CompareNotEq SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Raise Call NameLoad Str If CompareEq Call NameLoad SubscriptLoad NameLoad Index Str Num body Raise Call NameLoad Str Expr Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str NameLoad Dict Str Dict Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str NameLoad NameLoad Dict Str Dict Str NameLoad Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Index Str If CompareEq SubscriptLoad NameLoad Index Str Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Dict Str Str NameLoad Dict Str Num keyword Dict Str Dict Str Num keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad If BoolOpAnd NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Raise Call NameLoad Str Expr Call NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad
N/A N/A 
API functions relating to user management and registration.
 N/A bcrypt re urllib.parse urllib.request flask json N/A api api.common check validate safe_fail api.common WebException InternalException api.annotations log_action voluptuous Required Length Schema N/A _check_email_format N/A N/A N/A email N/A N/A N/A N/A re match .+@.+\..{2,} email None N/A user_schema N/A Schema N/A N/A Required email N/A Required firstname N/A Required lastname N/A Required country N/A Required username N/A Required password N/A Required background N/A check N/A Email must be between 5 and 50 characters. N/A str N/A Length min 5 max 50 N/A Your email does not look like an email address. N/A _check_email_format N/A check N/A First Name must be between 1 and 50 characters. N/A str N/A Length min 1 max 50 N/A check N/A Last Name must be between 1 and 50 characters. N/A str N/A Length min 1 max 50 N/A check N/A Please select a country N/A str N/A Length min 2 max 2 N/A check N/A Usernames must be between 3 and 20 characters. N/A str N/A Length min 3 max 20 N/A This username already exists. N/A N/A N/A N/A name N/A N/A N/A safe_fail get_user name name None N/A check N/A Passwords must be between 3 and 20 characters. N/A str N/A Length min 3 max 20 N/A check N/A You must provide your background! N/A str N/A Length min 3 max 20 extra True N/A new_eligible_team_schema N/A Schema N/A N/A Required team-name-new N/A Required team-password-new N/A Required team-school-new N/A check N/A The team name must be between 3 and 40 characters. N/A str N/A Length min 3 max 40 N/A A team with that name already exists. N/A N/A N/A N/A name N/A N/A N/A safe_fail N/A N/A api team get_team name name None N/A check N/A Team passphrase must be between 3 and 20 characters. N/A str N/A Length min 3 max 20 N/A check N/A School names must be between 3 and 100 characters. N/A str N/A Length min 3 max 100 extra True N/A new_team_schema N/A Schema N/A N/A Required team-name-new N/A Required team-password-new N/A check N/A The team name must be between 3 and 40 characters. N/A str N/A Length min 3 max 40 N/A A team with that name already exists. N/A N/A N/A N/A name N/A N/A N/A safe_fail N/A N/A api team get_team name name None N/A check N/A Team passphrase must be between 3 and 20 characters. N/A str N/A Length min 3 max 20 extra True N/A existing_team_schema N/A Schema N/A N/A Required team-name-existing N/A Required team-password-existing N/A check N/A Existing team names must be between 3 and 50 characters. N/A str N/A Length min 3 max 50 N/A There is no existing team named that. N/A N/A N/A N/A name N/A N/A N/A N/A N/A api team get_team name name None N/A There are too many members on that team for you to join. N/A N/A N/A N/A name N/A N/A N/A len N/A N/A N/A api team get_team_uids name name show_disabled False N/A N/A api team max_team_users N/A check N/A Team passwords must be between 3 and 50 characters. N/A str N/A Length min 3 max 50 extra True N/A teacher_schema N/A Schema N/A N/A Required teacher-school N/A check N/A School names must be between 3 and 100 characters. N/A str N/A Length min 3 max 100 extra True hash_password N/A N/A password N/A N/A N/A 
    Hash plaintext password.

    Args:
        password: plaintext password
    Returns:
        Secure hash of password.
     N/A N/A N/A bcrypt hashpw password N/A N/A bcrypt gensalt 8 N/A get_team N/A N/A uid N/A None N/A N/A 
    Retrieve the the corresponding team to the user's uid.

    Args:
        uid: user's userid
    Returns:
        The user's team.
     N/A user N/A get_user uid uid N/A N/A N/A N/A api team get_team tid N/A user N/A tid N/A get_user N/A N/A name uid N/A None None N/A N/A 
    Retrieve a user based on a property. If the user is logged in,
    it will return that user object.

    Args:
        name: the user's username
        uid: the user's uid
    Returns:
        Returns the corresponding user object or None if it could not be found
     N/A db N/A N/A N/A api common get_conn N/A match N/A N/A N/A uid None N/A N/A N/A N/A match update N/A uid uid N/A N/A N/A name None N/A N/A N/A N/A match update N/A username name N/A N/A N/A N/A N/A api auth is_logged_in N/A N/A N/A N/A match update N/A uid N/A N/A N/A api auth get_uid N/A N/A N/A InternalException Uid or name must be specified for get_user N/A user N/A N/A N/A db users find_one match N/A N/A user None N/A N/A N/A InternalException User does not exist N/A user N/A create_user N/A N/A username firstname lastname email password_hash tid teacher background country receive_ctf_emails N/A False undefined undefined False N/A N/A 
    This inserts a user directly into the database. It assumes all data is valid.

    Args:
        username: user's username
        firstname: user's first name
        lastname: user's last name
        email: user's email
        password_hash: a hash of the user's password
        tid: the team id to join
        teacher: whether this account is a teacher
    Returns:
        Returns the uid of the newly created user
     N/A db N/A N/A N/A api common get_conn N/A uid N/A N/A N/A api common token N/A N/A N/A safe_fail get_user name username None N/A N/A N/A InternalException User already exists! N/A updated_team N/A N/A N/A db teams find_and_modify query N/A tid size tid N/A $lt N/A N/A api team max_team_users update N/A $inc N/A size 1 new True N/A N/A updated_team N/A N/A N/A InternalException There are too many users on this team! N/A user N/A uid firstname lastname username email password_hash tid teacher disabled background country receive_ctf_emails uid firstname lastname username email password_hash tid teacher False background country receive_ctf_emails N/A N/A N/A N/A db users insert user N/A uid N/A get_all_users N/A N/A show_teachers N/A False N/A N/A 
    Finds all the users in the database

    Args:
        show_teachers: whether or not to include teachers in the response
    Returns:
        Returns the uid, username, and email of all users.
     N/A db N/A N/A N/A api common get_conn N/A match N/A N/A projection N/A uid username email tid 1 1 1 1 N/A N/A show_teachers N/A N/A N/A N/A match update N/A teacher False N/A N/A N/A projection update N/A teacher 1 N/A N/A list N/A N/A N/A db users find match projection N/A _validate_captcha N/A N/A data N/A N/A N/A 
    Validates a captcha with google's reCAPTCHA.

    Args:
        data: the posted form data
     N/A post_data N/A N/A N/A N/A N/A urllib parse urlencode N/A secret response remoteip N/A N/A api config reCAPTCHA_private_key N/A data N/A g-recaptcha-response N/A N/A flask request remote_addr encode utf-8 N/A request N/A N/A N/A urllib request Request N/A N/A api config captcha_url post_data method POST N/A response N/A N/A N/A N/A N/A N/A N/A urllib request urlopen request read decode utf-8 N/A parsed_response N/A N/A json loads response N/A N/A N/A parsed_response N/A success True N/A create_user_request N/A N/A params N/A N/A N/A 
    Registers a new user and creates/joins a team. Validates all fields.
    Assume arguments to be specified in a dict.

    Args:
        username: user's username
        password: user's password
        firstname: user's first name
        lastname: user's first name
        email: user's email
        create-new-teacher:
            boolean "true" indicating whether or not the user is a teacher
        create-new-team:
            boolean "true" indicating whether or not the user is creating a new team or
            joining an already existing team.

        team-name-existing: Name of existing team to join.
        team-password-existing: Password of existing team to join.

        team-name-new: Name of new team.
        team-school-new: Name of the team's school.
        team-password-new: Password to join team.

     N/A N/A validate user_schema params N/A N/A N/A N/A api config enable_captcha N/A N/A _validate_captcha params N/A N/A N/A WebException Incorrect captcha! N/A N/A N/A N/A params get create-new-teacher false true N/A N/A N/A N/A N/A api config enable_teachers N/A N/A N/A WebException Could not create account N/A N/A validate teacher_schema params N/A tid N/A N/A N/A api team create_team N/A eligible school team_name False N/A params N/A teacher-school N/A TEACHER- N/A N/A N/A api common token N/A N/A create_user N/A params N/A username N/A params N/A firstname N/A params N/A lastname N/A params N/A email N/A hash_password N/A params N/A password tid teacher True background N/A params N/A background country N/A params N/A country receive_ctf_emails N/A params N/A ctf-emails N/A N/A N/A N/A N/A params get create-new-team false true N/A N/A eligible True N/A eligible N/A N/A N/A validate new_eligible_team_schema params N/A N/A N/A validate new_team_schema params N/A team_params N/A team_name school password eligible N/A params N/A team-name-new N/A params N/A team-school-new N/A params N/A team-password-new eligible N/A tid N/A N/A N/A api team create_team team_params N/A N/A tid None N/A N/A N/A InternalException Failed to create new team N/A team N/A N/A N/A api team get_team tid tid N/A N/A N/A validate existing_team_schema params N/A team N/A N/A N/A api team get_team name N/A params N/A team-name-existing N/A N/A N/A team N/A password N/A params N/A team-password-existing N/A N/A N/A WebException Your team passphrase is incorrect. N/A uid N/A create_user N/A params N/A username N/A params N/A firstname N/A params N/A lastname N/A params N/A email N/A hash_password N/A params N/A password N/A team N/A tid background N/A params N/A background country N/A params N/A country receive_ctf_emails N/A params N/A ctf-emails N/A N/A uid None N/A N/A N/A InternalException There was an error during registration. N/A N/A N/A N/A api team determine_eligibility tid N/A team N/A tid N/A uid N/A log_action is_teacher N/A N/A uid N/A None N/A N/A 
    Determines if a user is a teacher.

    Args:
        uid: user's uid
    Returns:
        True if the user is a teacher, False otherwise
     N/A user N/A get_user uid uid N/A N/A N/A user get teacher False N/A set_password_reset_token N/A N/A uid token N/A N/A N/A 
    Sets the password reset token for the user in mongo

    Args:
        uid: the user id
        token: the token to set
     N/A db N/A N/A N/A api common get_conn N/A N/A N/A N/A db users update N/A uid uid N/A $set N/A password_reset_token token N/A delete_password_reset_token N/A N/A uid N/A N/A N/A 
    Removes the password reset token for the user in mongo

    Args:
        uid: the user id
     N/A db N/A N/A N/A api common get_conn N/A N/A N/A N/A db users update N/A uid uid N/A $unset N/A password_reset_token N/A find_user_by_reset_token N/A N/A token N/A N/A N/A 
    Searches the database for a team with the given password reset token
     N/A db N/A N/A N/A api common get_conn N/A user N/A N/A N/A db users find_one N/A password_reset_token token N/A N/A user None N/A N/A N/A WebException That is not a valid password reset token! N/A user N/A update_password_request N/A N/A params uid check_current N/A None False N/A N/A 
    Update account password.
    Assumes args are keys in params.

    Args:
        uid: uid to reset
        check_current: whether to ensure that current-password is correct
        params:
            current-password: the users current password
            new-password: the new password
            new-password-confirmation: confirmation of password
     N/A user N/A get_user uid uid N/A N/A check_current N/A N/A N/A N/A api auth confirm_password N/A params N/A current-password N/A user N/A password_hash N/A N/A N/A WebException Your current password is incorrect. N/A N/A N/A params N/A new-password N/A params N/A new-password-confirmation N/A N/A N/A WebException Your passwords do not match. N/A N/A N/A len N/A params N/A new-password 0 N/A N/A N/A WebException Your password cannot be empty. N/A N/A update_password N/A user N/A uid N/A params N/A new-password N/A log_action update_password N/A N/A uid password N/A N/A N/A 
    Updates an account's password.

    Args:
        uid: user's uid.
        password: the new user password.
     N/A db N/A N/A N/A api common get_conn N/A N/A N/A N/A db users update N/A uid uid N/A $set N/A password_hash N/A hash_password password N/A disable_account N/A N/A uid N/A N/A N/A 
    Disables a user account. They will no longer be able to login and do not count
    towards a team's maximum size limit.

    Args:
        uid: user's uid
     N/A db N/A N/A N/A api common get_conn N/A result N/A N/A N/A db users update N/A uid disabled uid False N/A $set N/A disabled True N/A tid N/A N/A N/A N/A api user get_team uid uid N/A tid N/A N/A N/A result N/A n 1 N/A N/A N/A N/A N/A db teams find_and_modify query N/A tid size tid N/A $gt 0 update N/A $inc N/A size -1 new True N/A N/A N/A N/A api team determine_eligibility tid N/A disable_account_request N/A N/A params uid check_current N/A None False N/A N/A 
    Disable user account so they can't login or consume space on a team.
    Assumes args are keys in params.

    Args:
        uid: uid to reset
        check_current: whether to ensure that current-password is correct
        params:
            current-password: the users current password
     N/A user N/A get_user uid uid N/A N/A check_current N/A N/A N/A N/A api auth confirm_password N/A params N/A current-password N/A user N/A password_hash N/A N/A N/A WebException Your current password is incorrect. N/A N/A disable_account N/A user N/A uid N/A N/A N/A N/A api auth logout N/A log_action