docs: def createuser(email, password, role=None, name=None, first_name=None):
      """Create new user."""
  
      if User.query.filter(User.email == email).count() > 0:
          print(f"A user with email '{email}' already exists, aborting.")
          return
  
      # if password is None:
      #     password = prompt_pass("Password")
  
      user = User(
          email=email,
          password=password,
          last_name=name,
          first_name=first_name,
          can_login=True,
      )
      db.session.add(user)
  
      if role in ("admin",):
          # FIXME: add other valid roles
          security = get_service("security")
          security.grant_role(user, role)
  
      db.session.commit()
      print(f"User {email} added")