• Resolved dhauradou

    (@dhauradou)


    Hello,

    I am creating a private social media plaform. So 99% of my website require to be logged in and to have a profile page with some personal informations. The only pages accessible to anyone are a landing page, some legal pages and a contact form.

    I would like my users to consent to all cookies (like FB or Linkedin) when they register. So my question I guess is : How to reactivate (implicit user consent) all cookies and personnal shared data when the user is logging in ?

    A logged-out user have to see the cookie banner and choose to consent or not, but when he is logging into the site, how can I reactivate all cookies automatically/programmatically if they have initially not given their consent (before registering or logging in) ?

    Thank you !

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Jarno Vos

    (@jarnovos)

    Hi @dhauradou,

    Aside from whether this would be GDPR-compliant, this should be possible to do.

    You could check if the user is logged in, if this is false, tell Complianz that the site doesn’t need the cookiewarning/blocker. It would look something like this:

    if (!is_user_logged_in())
    return apply_filters(‘cmplz_site_needs_cookiewarning’, false);

    Hope this helps.
    Kind regards,
    Jarno

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    The above is almost correct, but filter not used correctly:

    /**
     * Filter cookie warning required status
     * @param int $cookiewarning_required
     *
     * @return bool
     */
    function cmplz_my_filter_site_needs_cookiewarning( $cookiewarning_required
    ) {
    
    	//disable Complianz if user logged in
    	if ( is_user_logged_in() ) {
    		$cookiewarning_required = false;
    	}
    
    	return $cookiewarning_required;
    }
    add_filter( 'cmplz_site_needs_cookiewarning', 'cmplz_my_filter_site_needs_cookiewarning' );
    Thread Starter dhauradou

    (@dhauradou)

    Hello @jarnovos @rogierlankhorst,

    Thank you both so much for your replies.

    The filter works great, I do not see the floating banner when I log in. When logged in, on the cookie policy page generated by Complianz, I do not see the toggles for categorized cookies consent.

    Does this mean that when logged-in the cookie notice is hidden and the last user consent is respected, or this means that the cookie notice is hidden and no cookie is blocked (cookie bloker is disabled I think) ?

    If all cookies are blocked, this filter has the same action as cmplzAcceptAllCookies() in the JS side ?

    Thank you for your time, have a great day!

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    @dhauradou, Complianz is disabled completely, so the cookie blocker is disabled as well. All cookies will be placed by default.

    Thread Starter dhauradou

    (@dhauradou)

    @rogierlankhorst Thank for your fast reply, I’m happy with the filter, exactly what I needed.

    Great plugin and great support.

    Thank you.

    Plugin Contributor Mathieu Paapst

    (@paapst)

    Hi @dhauradou
    Great to hear that your issue is resolved! Could you tell us what you think of the plugin or the support by casting your Review here? We’d love to hear your feedback!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Reactivate cookies programmatically’ is closed to new replies.