#NEWLINE# @ log_action #NEWLINE# def disable_account_request( params , uid = None , check_current = False ) : #NEWLINE# #INDENT# "\n    Disable user account so they can't login or consume space on a team.\n    Assumes args are keys in params.\n\n    Args:\n        uid: uid to reset\n        check_current: whether to ensure that current-password is correct\n        params:\n            current-password: the users current password\n    " #NEWLINE# user = get_user ( uid = uid ) #NEWLINE# if ( check_current and ( not api . auth . confirm_password ( params [ 'current-password' ] , user [ 'password_hash' ] ) ) ) : #NEWLINE# #INDENT# raise WebException ( 'Your current password is incorrect.' ) #NEWLINE# #UNINDENT# disable_account ( uid [ 'uid' ] ) #NEWLINE# api . auth . logout ( )