• Resolved Sander Steffen

    (@ntertainme)


    I want to create and work with groups to achieve the following:

    I want to work with different groups with different acces but can’t seem to find how to do it. I installed woocommerce groups and wordpress groups.

    1. guest account can ONLY view job offers, but cannot APPLY and NO resume capability.
    How to do this exactly?

    2. payed members CAN view job offers and apply NO resume capability.

    3, DIAMOND members CAN:
    – see job offers
    – can apply
    – make a resume online

    4. Companies can ONLY post jobs and have to pay for it.

    It seems I have to figure out somehow how it works with groups and the capabilities. But I am stuck here… no clue. Can anybody help me just a bit?
    Or isn’t it possible?

    Thanks for your effort and reply.

    https://ww.wp.xz.cn/plugins/wp-job-manager/

Viewing 1 replies (of 1 total)
  • Did you see WordPress codex and this post that checks for user roles?

    /**
     * Checks if a particular user has a role.
     * Returns true if a match was found.
     *
     * @param string $role Role name.
     * @param int $user_id (Optional) The ID of a user. Defaults to the current user.
     * @return bool
     */
    function appthemes_check_user_role( $role, $user_id = null ) {
    
        if ( is_numeric( $user_id ) )
    	$user = get_userdata( $user_id );
        else
            $user = wp_get_current_user();
    
        if ( empty( $user ) )
    	return false;
    
        return in_array( $role, (array) $user->roles );
    }
    
    // example use for the current user
    if ( appthemes_check_user_role( 'customer' )
        _e( "You've got access dude!", 'appthemes' );
    else
        _e( "Sorry man, no luck.", 'appthemes' );
    
    // example use for a specific user
    $user_id = 23;
    
    if ( appthemes_check_user_role( 'customer', $user_id )
        _e( "You've got access dude!", 'appthemes' );
    else
        _e( "Sorry man, no luck.", 'appthemes' );
Viewing 1 replies (of 1 total)

The topic ‘Please help…. somebody?’ is closed to new replies.