Customizing SMF > SMF Coding Discussion

SMF check if the user is logged on

<< < (2/2)

Yoshi:

--- Quote from: 医生唱片骑师 on May 05, 2012, 12:10:19 PM ---Ehm shouldn't this be in coding discussion? :P

--- End quote ---
I already reported it to the team, I think it gets moved in a while.

Arantor:

--- Quote ---If so, do this for every user:
--- End quote ---

Running 2 or maybe 3 queries for every user, that's nice and efficient, isn't it? Pass an array of ids to loadMemberData rather than an individual member id at a time, so you only do one query for all of them.

Or you could query the {db_prefix}log_online table and get the id_members of all online members directly from there...

Yoshi:

--- Quote from: Arantor on May 05, 2012, 12:15:30 PM ---
--- Quote ---If so, do this for every user:
--- End quote ---

Pass an array of ids to loadMemberData rather than an individual member id at a time, so you only do one query for all of them.

--- End quote ---
Oh, sorry, forgot about that. Yeah, that's indeed more efficient :)

Laloeka:
I have another question extending this one, so I could continue here:

I want to check if a user is completely banned, or partially banned (i.e. not allowed to post), and possibly if it's permanent.

Navigation

[0] Message Index

[*] Previous page

Go to full version