<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def user_accept_terms(backend, user, uid, social_user=None, *args, **kwargs):
 """Check if the user has accepted the terms and conditions after creation."""


    LOGGER.debug('user_accept_terms')

    if TermsAndConditions.get_active_terms_not_agreed_to(user):
        return redirect_to_terms_accept('/')
    else:
        return {'social_user': social_user, 'user': user}