By Gayasien on Saturday, 08 November 2014
Replies 3
Likes 0
Views 871
Votes 0
Hello, is it possible to get a script for easysocial Point System if the Member dont have enough Points he cant Access this Area?

i mean this: YOU DONT HAVE ENOUGH POINTS TO ACCESS THIS SITE - PLEASE BYE SOME POINTS OR COLLECT IT ON A OTHER WAY - THANKS!
Hello Gayasien,

Hello, is it possible to get a script for easysocial Point System if the Member dont have enough Points he cant Access this Area?


You can get user's point by doing the below:


// get points for a particular user
$points = FD::user('35')->getPoints();

// get points for current logged in user
$points = FD::user()->getPoints();


Once you have the points, you can then do the IF condition.


// get points for current logged in user
$points = FD::user()->getPoints();

if ($points < 100 ) {
echo 'you need at least 100 points to access this area';
return;
}


Hope this help and have a nice day!
Sam
·
Sunday, 09 November 2014 16:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you for your help, but where must i place this code? in the php files of easysocial?
·
Sunday, 09 November 2014 19:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gayasien,

Which area are you trying to restrict the user's access? If you are referring to the entire EasySocial section, you need to place the codes in the file /components/com_easysocial/easysocial.php
·
Sunday, 09 November 2014 21:36
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post