get parameters on plugins

Get parameters on plugins, a forum discussion on Jojo CMS. Join us for more discussions on Get parameters on plugins on our Plugin Support forum.

Back to Forum Index : Back to Plugin Support   RSS
raulandres

2 Oct 2009
Posts: 35

hello i replicate code from jojo_hello plugin into jojo_community for add the group on register step, but doesnt work. I configure api similar to jojohello-api.php (with code line of add URI) and inside the jojo_community_register.php insert 3 lines:


$groupname = Jojo::getFormData('groupname', '');
$smarty->assign('groupname', $groupname);

//add user to group
Jojo::insertQuery("INSERT INTO {usergroup_membership} (userid, groupid) VALUES (?, ?)",
array($userid,$groupname));

and i add {$groupname} at templates/jojo_community_register.tpl

But doesnt work, not work display on register form-template and not work de insert query because de row not appear the group on databse, after push register button.
what i forget? thx in advance harvey or another jojo forum member
r.
Harvey

Core Developer

Harvey

8 Oct 2009
Posts: 327

Hi, if you are trying to add the user to a group after successful registration there is an option for doing this. Look under options for "defaultgroup" and simply enter the Group ID into here - eg subscribers, members etc (don't set 'admin' as the default group for obvious reasons).

Back to Forum Index : Back to Plugin Support   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.