parameters: (email, password, organization=None)
docstring: Resets password for EMAIL to PASSWORD.
docstring_summary: Resets password for EMAIL to PASSWORD.
docstring_tokens: Resets password for EMAIL to PASSWORD .
function: def password(email, password, organization=None):
      """
      Resets password for EMAIL to PASSWORD.
      """
      if organization:
          org = models.Organization.get_by_slug(organization)
          user = models.User.query.filter(
              models.User.email == email, models.User.org == org
          ).first()
      else:
          user = models.User.query.filter(models.User.email == email).first()
  
      if user is not None:
          user.hash_password(password)
          models.db.session.add(user)
          models.db.session.commit()
          print("User updated.")
      else:
          print("User [%s] not found." % email)
          exit(1)
function_tokens: def password ( email , password , organization = None ) : if organization : org = models . Organization . get_by_slug ( organization ) user = models . User . query . filter ( models . User . email == email , models . User . org == org ) . first ( ) else : user = models . User . query . filter ( models . User . email == email ) . first ( ) if user is not None : user . hash_password ( password ) models . db . session . add ( user ) models . db . session . commit ( ) print ( "User updated." ) else : print ( "User [%s] not found." % email ) exit ( 1 )