11 years ago
Topic

Hello,

i don't know if this has been described or mentioned before (search didn't find anything). But i think this is really important to know:


A lot of extensions check if the user is logged in by checking if a userId exists. If you are working with Seblod Multisites, the user ALWAYS has a userId assigned - even when he is not logged in. The reason for this is the way how multisites work - it uses the Joomla ACL for the different sites.


So, be aware to check extensions that have special features only for logged in users...

Thomas

Get a VIP membership
11 years ago
1
Level 1

Hi Thomas,

Excellent advise! Thank you.

If you know some extensions like this would be nice to post them here to begin a list (and maybe contact author).

Regards.

11 years ago
0
Level 2

Hello!


I think there are a lot of extensions that use something like "if($user->id)". It is the common way since Joomla 1.5. A lot of developers (including me) have used this.


The better way would be 

$user = JFactory::getUser();
$status = $user->guest;


(I guess, that has been added in plattform v.11.1... true?)

Seblod sets the Guest status correct. If you are not logged in, $user->guest returns "1" (which means not logged in).


Thomas

548 Posts
joomleb
11 years ago
0
Level 1

Hi Thomas, 

Can this error related to CK Template Creator  one of that extension ?

151 Posts
pixelpixel
11 years ago
0
Level 1

@Thomas


thumbs up for this hint :)

Get a VIP membership