*

slicer

  • ****
  • 204 posts
Re: "verified user label " for user that buy member ship.
« Reply #15 on: December 13, 2017, 02:07:53 PM »
@Bong
You can by yourself.

Code: [Select]
<?php
  
if(ModelOSP::newInstance()->getUserGroup( {user_id} ) > 0) {
    echo 
'my label';
  }
?>


{user_id} should be replaced with function to get user id, i.e. osc_logged_user_id() or osc_item_user_id() or osc_user_id();

Well @MB Themes, I think it might be a misunderstanding.

When I use the user's ID using "osc_user_id()" correctly shows verified and only that user shows up the badge, except when you log in, then everyone is verified user.

What I want right now and probably  @loma is to show a group of members as verified not a single person.

If you pay for a membership plan X, you carry a badge in your profile/items that you are verified or something.

*

MB Themes

Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #16 on: December 13, 2017, 02:22:40 PM »
@slicer
I do not think osc_user_id() is correct function, you should rather use osc_item_user_id()
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Loma

  • ***
  • 69 posts
  • Loma
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #17 on: December 13, 2017, 03:25:40 PM »
@MB Themes

 if member(user that buy membership) login all user (user post listing) make as Verified too.
but if not login it work well

regard

*

MB Themes

Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #18 on: December 13, 2017, 04:35:51 PM »
That is because osc_user_id returns id of logged user
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

slicer

  • ****
  • 204 posts
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #19 on: December 13, 2017, 04:36:59 PM »
@slicer
I do not think osc_user_id() is correct function, you should rather use osc_item_user_id()

@MB Themes same results: it works while offline, but when you log in all other users are also verified.

Used:

<?php
  if(ModelOSP::newInstance()->getUserGroup(osc_item_user_id()) > 1) {
    echo 'Verfied ';
   
  }
?>


in my testing:
1 = current user ID
If it were based on group ID it should be 3 but it doesn't work with group ID though

*

reflexus

  • ****
  • 146 posts
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #20 on: December 13, 2017, 04:53:39 PM »
@MB Themes

 if member(user that buy membership) login all user (user post listing) make as Verified too.
but if not login it work well

regard

Code: [Select]
<?php
  
if(ModelOSP::newInstance()->getUserGroup(osc_item_user_id()) > 0) {
    echo 
'Verified';
  }
?>

It's work fine, and this is right solution!

*

Claso co.ltd

  • ***
  • 29 posts
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #21 on: December 14, 2017, 12:30:54 PM »
@reflexus where you put it ? in item.php and user public?
did you test with user login  and visit other item ? if you login and visit other item it will show Verified label in user that not member ship


*

reflexus

  • ****
  • 146 posts
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #22 on: December 14, 2017, 04:55:06 PM »
@reflexus where you put it ? in item.php and user public?
did you test with user login  and visit other item ? if you login and visit other item it will show Verified label in user that not member ship

I have tested it in item.php, and if i login and visit other item it will not show for other items! All is ok for me, you are doing something wrong

*

Claso co.ltd

  • ***
  • 29 posts
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #23 on: December 15, 2017, 05:22:16 AM »
@reflexus
i have login as membership user that verified but all user make as verified too when visit item.php

i don't know why.

*

reflexus

  • ****
  • 146 posts
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #24 on: December 15, 2017, 02:24:24 PM »
@reflexus
i have login as membership user that verified but all user make as verified too when visit item.php

i don't know why.

What is your template and where do you put it?

*

Claso co.ltd

  • ***
  • 29 posts
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #25 on: December 16, 2017, 06:11:58 AM »
Veronika theme , i put it in item.php

*

MB Themes

Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #26 on: December 16, 2017, 11:31:38 AM »
@MB Themes

 if member(user that buy membership) login all user (user post listing) make as Verified too.
but if not login it work well

regard

Code: [Select]
<?php
  
if(ModelOSP::newInstance()->getUserGroup(osc_item_user_id()) > 0) {
    echo 
'Verified';
  }
?>

It's work fine, and this is right solution!
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Claso co.ltd

  • ***
  • 29 posts
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #27 on: December 16, 2017, 02:16:17 PM »
trey to test  it your self

Quote
Quote from: reflexus on December 13, 2017, 04:53:39 PM
Quote from: Loma on December 13, 2017, 03:25:40 PM
@MB Themes

 if member(user that buy membership) login all user (user post listing) make as Verified too.
but if not login it work well

regard

Code: [Select]
<?php
  if(ModelOSP::newInstance()->getUserGroup(osc_item_user_id()) > 0) {
    echo 'Verified';
  }
?>

It's work fine, and this is right solution!

*

reflexus

  • ****
  • 146 posts
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #28 on: December 16, 2017, 02:42:57 PM »
trey to test  it your self

Quote
Quote from: reflexus on December 13, 2017, 04:53:39 PM
Quote from: Loma on December 13, 2017, 03:25:40 PM
@MB Themes

 if member(user that buy membership) login all user (user post listing) make as Verified too.
but if not login it work well

regard

Code: [Select]
<?php
  if(ModelOSP::newInstance()->getUserGroup(osc_item_user_id()) > 0) {
    echo 'Verified';
  }
?>

It's work fine, and this is right solution!

I just tried it on the template Veronika, and I want to say that everything works correctly, with login and without.

I can help you and put code for you, but no for free

« Last Edit: December 16, 2017, 02:45:28 PM by reflexus »

*

Claso co.ltd

  • ***
  • 29 posts
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #29 on: December 17, 2017, 02:50:46 PM »
Quote
I just tried it on the template Veronika, and I want to say that everything works correctly, with login and without.

I can help you and put code for you, but no for free

you are so kidding me.