[Assigned] Online Users
Page: 1
andthereitgoes
on Jul 26. 2006. 5:06 pm
I think when a client A logs in; he should only see users that were online recently for that particular client A or the users involved in the project with that client A from the owner company.
Thus users of owner_company that are not involved in particular project for Client A; should not be seen online for Client A.
Currently all users are visible who have logged in. i.e all clients A,B,C... and owner company.
Thus users of owner_company that are not involved in particular project for Client A; should not be seen online for Client A.
Currently all users are visible who have logged in. i.e all clients A,B,C... and owner company.
forrest2828
on Jul 27. 2006. 1:33 am
Still waiting for updates.
Check out:
http://forum.activecollab.com/viewtopic.php?id=227
Check out:
http://forum.activecollab.com/viewtopic.php?id=227
andthereitgoes
on Jul 27. 2006. 8:03 am
i sort of hacked around it with whatever time i had.
just modified Users.class.php file
added "and company_id = 0" which is the owner_company id since i required a quick solution. Thus for now i have a temporary solution.
But yes if it is fixed in 0.7 that would be great.
Good Work (Y)
just modified Users.class.php file
added "and company_id = 0" which is the owner_company id since i required a quick solution. Thus for now i have a temporary solution.
But yes if it is fixed in 0.7 that would be great.
Good Work (Y)
Just wondering can we get your copy/paste drop-in for:
static function getWhoIsOnline($active_in = 15) {
if((integer) $active_in < 1) $active_in = 15;
$datetime = new DateTime(null, -1 * $active_in * 60);
return Users::findAll(array(
'conditions' => '`last_activity` > ' . DB::escape($datetime)
)); // findAll
} // getWhoIsOnline
Thanks in advance.
static function getWhoIsOnline($active_in = 15) {
if((integer) $active_in < 1) $active_in = 15;
$datetime = new DateTime(null, -1 * $active_in * 60);
return Users::findAll(array(
'conditions' => '`last_activity` > ' . DB::escape($datetime)
)); // findAll
} // getWhoIsOnline
Thanks in advance.
andthereitgoes
on Jul 27. 2006. 7:21 pm
pjkenned:Just wondering can we get your copy/paste drop-in for:
static function getWhoIsOnline($active_in = 15) {
if((integer) $active_in < 1) $active_in = 15;
$datetime = new DateTime(null, -1 * $active_in * 60);
return Users::findAll(array(
'conditions' => '`last_activity` > ' . DB::escape($datetime) .' and company_id = 0 '
)); // findAll
} // getWhoIsOnline
Thanks in advance.
just temporary as i needed some quick solution without loosing the functionality.. because its a good function.
also didnt have the time to look through the code to find how to access company_id
ideally it would be
' and ( (company_id = owner_company and user belongs to project) OR (company_id = client_company_id ) ) '
just observed.. the company id i used is 1 and not 0. apologies for the blooper.
andthereitgoes
on Jul 28. 2006. 7:21 am
as mentioned in your comment in the code:
for a userA1 of owner company assigned to a projectAA with client A
should he be able to see userB1 of owner_company assigned to a projectBB with client B??
it is harmless though, but was just wondering?
going to be added for .7?
also another thing that i observed. consider this
a userA1 of owner company assigned to a project AA with client A
he has logged in and done some work in his account.
now the administrator transfers the userA1 of owner_company from project AA (Client A )
to project BB ( with client B ). Now i think his last_activity should be reset at this point
As of now for 15 minutes userA1 will/would appear online for both ClientA and Client B
but since this is without project check; dont know.
project check going to be added for .7??
the code works fine though making the clients invisible to each other.
not sure whether this has been updated on SVN.
as my project is not showing any changes to user class when updated through SVN
for a userA1 of owner company assigned to a projectAA with client A
should he be able to see userB1 of owner_company assigned to a projectBB with client B??
it is harmless though, but was just wondering?
going to be added for .7?
also another thing that i observed. consider this
a userA1 of owner company assigned to a project AA with client A
he has logged in and done some work in his account.
now the administrator transfers the userA1 of owner_company from project AA (Client A )
to project BB ( with client B ). Now i think his last_activity should be reset at this point
As of now for 15 minutes userA1 will/would appear online for both ClientA and Client B
but since this is without project check; dont know.
project check going to be added for .7??
the code works fine though making the clients invisible to each other.
not sure whether this has been updated on SVN.
as my project is not showing any changes to user class when updated through SVN
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.



