Support Forum

Password Protect forum?

17 Answers

New Answer

JO JohnnyNT
JohnnyNT
Member

Hi guys, i am trying to do similar thing as people posted here, i want to automaticaly add member to usergroup so he can acces some part of forums.

So, i find out that name of function si not sfc_add_membership(), it is  sp_add_membership() and it is located in “wp-content/plugins/simple-press/sp-api/sp-api-users.php”.

 

I tried to call this function in outside file (i included  sp-api-users.php), and – doesnt work. Then i “followed” errors and  included “sp-api-auths.php”, “sp-api-primitives.php” and “wp-includes/load.php”. But then i got this error: 

“PHP Fatal error: Call to a member function get_var() on a non-object in blahblah/wp-content/plugins/simple-press/sp-api/sp-api-primitives.php on line 235 ” 

 

So, i have no idea what to do next 😀 And is this correct way to call this function? 

JO JohnnyNT
JohnnyNT
Member

It’s ok, i find out that i can write plugin for this, and i did that, and everything works. Resources: https://simple-press.com/support-forum/sp5-plugin-topics/5-0-alpha-plugins/

 

And tnx for the creators of this wonderful software 🙂