Forum
Welcome, Guest
Please Login to access forum.
Restricted list of users (1 viewing) 
Go to bottom
TOPIC: Restricted list of users
#4127
Bertrand Couvin
Junior Boarder
Posts: 21
User Offline
Restricted list of users Karma: 0  
Hello,
I would like to limit the users to a specific group of users which is not defined by the usual users group from joomla. The group members in my joomla are classified by a category of type of work (developpers, architects, business analysts, etc...). I have different projects in which project users are the combination of the users explained above. I would like to filter by projects. The chat session is only for a chat inside the project team. Please let me know how i could customize this list. This list comes from a mysql command to select the users in mysql table. Where could i customize your script to take account this list.
Thanks in advance
Bertrand
 
Logged Logged  
  The administrator has disabled public write access.
#4129
John Dagelmore
Admin
Posts: 3722
User Online Now
Re:Restricted list of users Karma: 79  
Hello Bertrand,

the logic that retrieves the users list used for the chat is included in the file:
root/components/com_jchat/models/stream.php

in the function named: getBuddyList

Cheers,
John
 
Logged Logged  
  The administrator has disabled public write access.
#4308
Bertrand Couvin
Junior Boarder
Posts: 21
User Offline
Re:Restricted list of users Karma: 0  
Hello John,

Thank John for this info. I admit it's not easy to make this integration because there is some concatenation of different criteria inside your query. This depends on Session, banned users, and so on.

Let me know if it is possible from your side to indicate me precisely where I could integrate my query:

SELECT DISTINCT o.user_id FROM $ProjectMemberList o RIGHT JOIN $ProjectList p ON o.project_id=p.project_id WHERE (p.user_id=$user_current_id)

I have my list of users in $ProjectMemberList table. Each row of this table defines the user_id and the project_id he belongs to.

The $ProjectList table defines the project_id and the project owner who is the project manager.

This query searches all users (project team members) working on differents projects where to the current user is the project manager (i.e. $user_current_id).


Nota: I see that for the private messages, I got also the same request.

Thanks in advance.
Regards
 
Logged Logged  
  The administrator has disabled public write access.
#4310
John Dagelmore
Admin
Posts: 3722
User Online Now
Re:Restricted list of users Karma: 79  
Hello Bertrand,

yes the SQL query and the chat app is quite complex and is built on several criteria.

From your explananations i see that you need to add 2 more SQL JOINS and filter by user id.

This can be done directly in the bode of the final query concatenation.

Code:

$sql = "SELECT u.id, u.$userFieldName, sess.time ..... ORDER BY u.$userFieldName ASC";
Cheers, John
 
Logged Logged  
  The administrator has disabled public write access.
#4473
Bertrand Couvin
Junior Boarder
Posts: 21
User Offline
Re:Restricted list of users Karma: 0  
Hello John,

Thanks for this.
I made the modification as indicated. It seems to work for the JChat...Let see!

Just another question related to the same topic. It is for the private messaging. Where do I need to make the modification to get the restricted list of users, instead of the complete one?

Thanks for your help.
Regards
 
Logged Logged  
  The administrator has disabled public write access.
#4474
John Dagelmore
Admin
Posts: 3722
User Online Now
Re:Restricted list of users Karma: 79  
Hello Bertrand,

so far so good.

For the private messaging, you find the query in the file root/components/com_jchat/models/messaging.php
at line 42 inside the function: buildListQuery

Regards,
John
 
Logged Logged  
  The administrator has disabled public write access.
Go to top