Get user group

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 6 reply threads
  • Author
    Posts
    • #86968
      PATselov
      Participant

      I use WCFM – Ultimate and WCFM – Groups & Staffs
      After registering a user according to the tariff plan and a specific group, I need to get the status of a user to show or hide information.
      For example: there are two groups “Free” and “Payment”
      How to find out the type of user that displays information only for “Payment”?

    • #87136
      WCFM Forum
      Keymaster

      HI,

      You have to setup capability setting for each group.

      DO you have setup that yet?

      Thank You

    • #87155
      PATselov
      Participant

      Yes, I already set up groups.
      I’m interested in the code so that I can use it in php files when I edit page templates.

    • #87509
      WCFM Forum
      Keymaster

      Hi,

      I need to get the status of a user to show or hide information.

      – Which information you are talking about, please show me screenshot.

      Vendor information visibility can be manage from capability setting – https://ibb.co/2ccmKNs

      Thank You

    • #87540
      PATselov
      Participant

      No, I need this as a variable value, so that I can use this value in if else blocks when writing my own template code.

    • #87895
      WCFM Forum
      Keymaster

      Well, there has filters to check all these capabilities.

      You have to tell me exact requirement, then I ca give you right filter for that checking.

      Thank You

      • #88008
        PATselov
        Participant

        I created my own post type and fields for it
        I have 3 tariff plans Standard, Business, Premium
        In my template I want to display some fields only for the Premium group
        To do this, to use the “if {} else {};” I need to find out which group the logged in user.
        How do I get the value which of the groups the user belongs to?

    • #88411
      WCFM Forum
      Keymaster

      HI,

      Use this to fetch vendor’s groups –

      $wcfm_user_groups = (array) get_user_meta( $user_id, '_wcfm_vendor_group', true );

      Well, this returns groups in array format as one vendor may associate with multiple groups.

      Thank You

Viewing 6 reply threads
  • The topic ‘Get user group’ is closed to new replies.