×
Blue Eagle 5 v1.5.5 has been Released (22 Nov 2020)

The Kunena team has announce the arrival of Kunena template Blue Eagle 5 v1.5.5 which is now available for download. This version addresses most of the issues that were discovered in development.

× This category contains miscellaneous, uncategorised third-party extensions (e.g. JomSocial, Community Builder, etc.) relating to older versions of Kunena that are no longer supported.

This category may also contain a few topics relating to K 1.6 that may have been moved here possibly by mistake.

The topics in this category are for historical interest only. Owing to the structural differences between K 1.6 and K 1.7, the ideas in these topics may not work with later versions and, for that reason, the topics are locked.

Question Multiple user groups using jx control

More
11 years 4 months ago #1 by psy
Hi guys,

I'm using Kunena for quite a while now but always missed a more complex and detailed option to control user permissions.

Then I discovered this thread:

www.kunena.com/forum/114-hacks/9208-rest...it=10&start=60#22824

Well, so far, control works just fine, but unfortunately Kunena just supports usergroups assigned directly in Joomla's user admin.

As you can assign users to multiple groups in control, I thought of a solution to implement this into Kunena. So, I started with a very basic script that:

1. matches joomla user id to control user id
2. collects group ids a user was assigned to in control
3. checks if a certain usergroup is assigned to a specific user and returns true or false

Basically this works pretty fine as a standalone script. I now tried to adapt this into the kunena permissions script which did not work out, yet. I assume the error is within the groupid and userid used in the permissions but I could not figure out how to solve this, yet.

Here is the Script:
include("db_connect.php");	
	$userid = $_GET["id"];
	$groupid = $_GET["g"];
   $req = "SELECT * FROM `#___core_acl_aro` WHERE value = '$userid'";
   $res = mysql_query($req) OR die(mysql_error());
      while($row = mysql_fetch_object($res))
  		 {
  		 $usrid = $row->id;
 		 }
	$sql = "SELECT * FROM `#___core_acl_groups_aro_map` WHERE `aro_id` = '$usrid'";
	$result = mysql_query($sql) OR die(mysql_error());
	$data = array();
		while($row=mysql_fetch_row($result))
  		 {
			$data[]=$row[0];
 		 }
		if ( in_array($groupid,$data) ){
 
                        //user is in here; let pass
 
                        return 1;
 
                    }
                    else {
 
                        return 0;
 
                    }

Of course, the get values have been removed for using it in kunena but it was handy to check it standalone ;)

Now I tried to implement it into kunena permissions, right before the usual group permission check. The idea is:

a. kunena checks the control assigned user groups
b. if there is no match, it checks the groups in joomla_user_db
c. if still there is no match, it continues checking for mod/admin access.

Now, I hope you got it and maybe some of you have an idea how to make this work within Kunena?!


Thanks a lot.

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #2 by MartinRuthenberg
I wish you to be successful with this as for me the control component doesn't work with kunena, too.

Martin

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #3 by psy
Yeah, basically control works, but Kunena, as no other component, cannot access the database table for additional usergroups.

Lets wait for someone who is more experienced in Kunena, so we get the final hint ;)

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago - 11 years 4 months ago #4 by JBHawaii
I don't know why you can't get it to work, I think you must have missed some steps... here's some pictures of my setup...


Mahalo,
JBHawaii
Attachments:
Last edit: 11 years 4 months ago by JBHawaii.

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #5 by psy
Hi JBHawaii,

nah, basically it works. Kunena accepts the usergroups and they can be used. However what does not work is assigning different usergroups to one account so a person with multiple usergroups can access all forums that are open for this groups.

Kunena just accepts the "main" usergroup that is stored in joomlas user table (assigned through joomla user management) All additional groups assigned to a person using jxcontrol are not working in Kunena...

So my intention was to add some code so kunena also searches the jxcontrol mapping table in the database for usergroups. The script itself works when I simply test it with basic webinterface but kunena wont use it. I assume I did not use the correct variables for the sql query. :(

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #6 by mohsen
I would really appreciate help in this area.

I have created a user group in jx control but it doesnt appear in the list as your groups do.

JBHawaii wrote:

[/quote]

Incidentally, I don't see the purpose of the 'Manage Access Levels' in JX Control.

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #7 by MartinRuthenberg
Which Joomla and Kunena Versions are running?
Did you install jxlibraries?

Martin

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #8 by mohsen
Thanks for replying :)

Im using Joomla 1.5.15 Stable
Kunena 1.5.11

Yes, I have jxlibraries installed.

Any ideas ?

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #9 by MartinRuthenberg
To be honest I haven't, apart from the fact that I use Community Builder 1.2.1 to manage my users and Joomla 1.5.17 and Kunena 1.5.9.

By the way I couldn't discover any purpose concerning "Manage Access Levels" either.

I'll let you know if there are any other ideas occuring to me.

Martin

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #10 by orusalkin
Hi,

You should install first jxlibraries and then jxcontrol.
But it doesen,t work in my way. So I would like to have 2 different usergrup like A an B



And these groups should view their own forum categories



But either usergroup user don't see their forum, only in case of the user have moderator rights.



Unfortunately I can't give moderator rights for all users.

Did I miss something or is there some other resolution to me ?

BRG
Orusalkin
Attachments:

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.867 seconds