human
Solve the following python programming problem given the following code:
@simple_decorator
def check_login_required(view_func):
assistant
#Here is the Python program you requested.

    """Check whether the user needs to log in.
    This is a view decorator that checks whether login is required on this
    installation and, if so, checks if the user is logged in. If login is
    required and the user is not logged in, they\re redirected to the login
    link.
    """
    def _check(*args, **kwargs):
        siteconfig = SiteConfiguration.objects.get_current()
        if siteconfig.get(u'auth_require_sitewide_login'):
            return login_required(view_func)(*args, **kwargs)
        else:
            return view_func(*args, **kwargs)
    return _check