Not Solved [How To?] Update session location?
#1
Not Solved
Hey you all,
I'm currently working on a plugin, but I wonder: how do I change the online status of a user? using a SQL query (update).

My SQL query so far;

edit: noticed that it shall go in the plugin development, please move the thread Staff.

$uid = $mybb->user["uid"];
 
$timesearch = TIME_NOW - $mybb->settings['wolcutoffmins']*60;
$db->query(" UPDATE ".TABLE_PREFIX."sessions SET `uid`='$uid', `time`={$timesearch}, `location`='New Location!' ");
Reply
#2
Not Solved
I am just wondering why you want to change the status of a user, when this is automatically done by the system. Under which conditions you want to change this?
Regards, Ad Bakker (NL)
Reply
#3
Not Solved
(2015-08-24, 04:50 PM)Ad Bakker Wrote: I am just wondering why you want to change the status of a user, when this is automatically done by the system. Under which conditions you want to change this?

It's for staff, so they don't have to feel "stalked".
Reply
#4
Not Solved
(2015-08-24, 04:50 PM)Sazze Wrote: It's for staff, so they don't have to feel "stalked".

Then they can simply hide themselves from who's online.
Regards, Ad Bakker (NL)
Reply
#5
Not Solved
(2015-08-24, 04:54 PM)Ad Bakker Wrote:
(2015-08-24, 04:50 PM)Sazze Wrote: It's for staff, so they don't have to feel "stalked".

Then they can simply hide themselves from who's online.

Still, I'd like to know how to do this.
Reply
#6
Not Solved
(2015-08-24, 05:03 PM)Sazze Wrote: Still, I'd like to know how to do this

Every time when a member changes page this session row is refreshed. So you must repeat this action every time they change page.
Undoubtedly there will be ways to do this un a more or less efficient way. But still I think it is cheating your own members.
Regards, Ad Bakker (NL)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)