I'm not sure what you mean by that. I didn't see a 'Query' option in the Field type there. Setting a query field in CB Fields?I suppose you could use a query field to query for their raw rank id then condition against that
INSERT INTO #_user_usergroup_map (user_id, group_id)
SELECT userid, 10
FROM #_kunena_users
WHERE userid = [user_id] AND rank = 5;
UPDATE #_comprofiler
INNER JOIN#_kunena_users ON #_kunena_users.userid = #_comprofiler.user_id
SET cb_heritage = '1'
WHERE #_comprofiler.user_id = [user_id] AND #_kunena_users.rank = '5';
System Information of testing environment
Setting Value
PHP Built On Linux gator0.hostgator.com 3.12.65-188.ELK6.x86_64 #1 SMP Thu Oct 20 23:27:48 CDT 2016 x86_64
Database Version 5.5.51-38.2
Database Collation utf8_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 5.6.29
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.6.5 Stable [ Noether ] 1-December-2016 22:46 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36
Please Log in to join the conversation.
You'd use a CB Query Field to query for whatever value you need then you'd condition against it. In this case you need the raw rank id from Kunena so probably the below.I'm not sure what you mean by that. I didn't see a 'Query' option in the Field type there. Setting a query field in CB Fields?
SELECT `rank` FROM `#__kunena_users` WHERE `userid` = '[user_id]'
Do not directly insert into _user_usergroup_map. Use the usergroup action which properly uses Joomla API to adjust usergroups.I tested in the CB Auto Actions with this Query in the Action tab and setting with
Please Log in to join the conversation.
Please Log in to join the conversation.