def get_last_login_timestamp(user):
    """
    Django 1.7 allows the `last_login` timestamp to be `None` for new users.
    """
    return int(user.last_login.strftime('%s')) if user.last_login else 0
