@users.command('new')
@click.option('--username', '-u', help='The username of the user.')
@click.option('--email', '-e', type=EmailType(), help='The email address of the user.')
@click.option('--password', '-p', help='The password of the user.')
@click.option('--group', '-g', help='The group of the user.', type=click.Choice(['admin', 'super_mod', 'mod', 'member']))
def new_user(username, email, password, group):
 try:
  user = save_user_prompt(username, email, password, group)
  click.secho('[+] User {} with Email {} in Group {} created.'.format(user.username, user.email, user.primary_group.name), fg='cyan')
 except IntegrityError:
  raise FlaskBBCLIError("Couldn't create the user because the username or email address is already taken.", fg='red')

@ users . command ( 'new' ) @ click . option ( '--username' , '-u' , help = 'The username of the user.' ) @ click . option ( '--email' , '-e' , type = EmailType ( ) , help = 'The email address of the user.' ) @ click . option ( '--password' , '-p' , help = 'The password of the user.' ) @ click . option ( '--group' , '-g' , help = 'The group of the user.' , type = click . Choice ( [ 'admin' , 'super_mod' , 'mod' , 'member' ] ) ) def new_user ( username , email , password , group ) : try : user = save_user_prompt ( username , email , password , group ) click . secho ( '[+] User {} with Email {} in Group {} created.' . format ( user . username , user . email , user . primary_group . name ) , fg = 'cyan' ) except IntegrityError : raise FlaskBBCLIError ( "Couldn't create the user because the username or email address is already taken." , fg = 'red' )
creates a new user .