This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Loma

  • ***
  • 69 posts
  • Loma
"verified user label " for user that buy member ship. ( Solved )
« on: November 10, 2017, 09:18:47 AM »
can you make "verified" user label  for user that buy member ship ?
that is useful for member ship.

regard
« Last Edit: November 17, 2017, 03:54:37 AM by Loma »

*

MB Themes

Re: "verified user label " for user that buy member ship.
« Reply #1 on: November 10, 2017, 02:26:14 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();
  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.
« Reply #2 on: November 15, 2017, 04:06:04 PM »
i use this code in item page and it not work



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

*

Loma

  • ***
  • 69 posts
  • Loma
Re: "verified user label " for user that buy member ship.
« Reply #3 on: November 15, 2017, 04:39:16 PM »
it work for all user . :'(

*

MB Themes

Re: "verified user label " for user that buy member ship.
« Reply #4 on: November 15, 2017, 04:44:10 PM »
@Bong
What you mean?
If it is shown on user, then:
1) you use incorrect user id
2) that user is in some group as well
  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.
« Reply #5 on: November 16, 2017, 06:10:10 AM »
<?php
  if(ModelOSP::newInstance()->getUserGroup(osc_item_user_id()) > 0) {
    echo 'Verified';
  }
?>

1. i use this code in item.php and user of item is already member
2. i use this code in user public page and user is already member


but it always show Verified label all user

Marked as best answer by bong.toeurn on November 17, 2017, 03:53:59 AM
*

MB Themes

Re: "verified user label " for user that buy member ship.
« Reply #6 on: November 16, 2017, 07:57:41 AM »
1) you can check id of group:
Code: [Select]
echo ModelOSP::newInstance()->getUserGroup(osc_item_user_id())
It's still not clear who should be verified member, if it is anyone that is member in any group (?)

2) it will not work there, as osc_item_user_id() is related to item. You can try osc_user_id() there.
  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.
« Reply #7 on: November 17, 2017, 03:53:53 AM »
Now it worked ,
Thank you !

*

MB Themes

Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #8 on: November 17, 2017, 10:56:48 AM »
@Loma
Can you post final solution that worked for you? Maybe someone else will be looking for that ;)
  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 #9 on: November 19, 2017, 07:57:09 AM »
Solution : add this code where you want to display like item.php and public page

<?php
  if(ModelOSP::newInstance()->getUserGroup( osc_user_id() ) > 0) {
    echo 'Verified';
  }
?>

*

Loma

  • ***
  • 69 posts
  • Loma
Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #10 on: November 22, 2017, 04:05:21 PM »
when other user login (not member) it also show all user as Verified too.

this code is not work correct

regard

*

MB Themes

Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #11 on: November 22, 2017, 04:10:04 PM »
@Loma
Use correct function (osc_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 #12 on: November 24, 2017, 08:05:37 AM »
still not work sir.
any solution?

*

MB Themes

Re: "verified user label " for user that buy member ship. ( Solved )
« Reply #13 on: November 24, 2017, 08:24:03 AM »
@Loma
Then you are not using correct user id.
Place echo osc_user_id(); to your file to see if ID is correct. If not, look for correct.
  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 #14 on: November 24, 2017, 09:09:12 AM »
i don't know about coding, i am sorry . can you give me a code

<?php
  if(ModelOSP::newInstance()->getUserGroup() > 0) {
    echo 'osc_user_id()';
    echo '<i class="fa fa-check-circle" aria-hidden="true"></i>';
  }
?>