@classmethod
    def create_user(cls, name, email, password, email_verified=True):
        """Create (and save) a new user with the given password and
        email address.
        """
        now = datetime.datetime.utcnow()
        
        # Normalize the address by lowercasing the domain part of the email
        # address.
        try:
            email_name, domain_part = email.strip().split('@', 1)
        except __HOLE__:
            pass
        else:
            email = '@'.join([email_name.lower(), domain_part.lower()])
            
        user = User(name=name, email=email, date_joined=now)

        if( not password):
            password = generate_password()
        user.set_password(password)

        if( not email_verified):
            user.mark_email_for_activation()
        else:
            user.is_email_activated = True

        user.save()

        return user
dataset/ETHPy150Open manasgarg/flask-sauth/flask_sauth/models.py/BaseUser.create_user