def METHOD_NAME(name, login):
    email = login if '@' in login else None
    user = User(
        name=name or login,
        login=login,
        password=generate_password_hash(password),
        roles=current_app.config['ADMIN_ROLES'],
        text=text,
        email=email,
        email_verified=bool(email)
    )
    try:
        user = user.create()
    except Exception as e:
        click.echo(f'ERROR: {e}')
    else:
        return user