• Hi,

    last question before I buy the premium kit.

    Is it possible (sure it is) to insert costum code to display a message on the site where the plugin is used, but ONLY if the login user is a woman?

    Best Regards
    Michael

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jacques Malgrange

    (@sojahu)

    Bonjour,

    Pour savoir si un membre est connecté :

    <?php
    if(is_user_logged_in()) { // do what you want
    }
    ?>

    Pour savoir si une femme est connectée, il faut créer la fonction adaptée :

    <?php
    function is_logged_in_girl() {
    	global $current_user, $wpdb;
    	$sex = $wpdb->get_var("SELECT i_sex FROM ".$wpdb->prefix."rencontre_users WHERE user_id=".$current_user->ID." LIMIT 1");
    	if(is_user_logged_in() && $sex===1) return true;
    	return false;
    }
    if(is_logged_in_girl()) { // do what you want
    }
    ?>

    Cordialement

    Plugin Author Jacques Malgrange

    (@sojahu)

    Oups, in English :

    To know if a member is logged in :
    — code —

    To know if a woman is logged in, you must create the appropriate function :
    — code —

    Regards

    Thread Starter mobsie01

    (@mobsie01)

    Hi,

    all great thank you! It works.

    Cheers,
    Mike

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Message only for woman’s’ is closed to new replies.