EasyExpat
Member
Hello,
I am using XF login to allow also member to post classifieds on external parts of the website.
I was wondering what is the best way to take into account that some users might not be unconfirmed (in that case I assume they cannot log) or banned.
Currently I am using:
I was wondering if I should include group_id and maybe status, such as:
BTW what is $visitor['user_state'] == "valid"
I read some explanation here:
In summary, what is the best way to allow a visitor to do something when they are legitimate, registered and have not been either discouraged or banned?
Thanks in advance for your help.
I am using XF login to allow also member to post classifieds on external parts of the website.
I was wondering what is the best way to take into account that some users might not be unconfirmed (in that case I assume they cannot log) or banned.
Currently I am using:
PHP:
if ($visitor['user_id'])
{
}
PHP:
if ($visitor['user_id'] && ($visitor['user_group_id'] != 2 || $visitor['user_group_id'] != 13) && $visitor['user_state'] == "valid" &&
!$visitor['is_banned'])
{
user_state = 'valid' AND a.user_group_id <> 1 AND a.user_group_id
}
I read some explanation here:
And is !$visitor['is_banned'] necessary? I assume they cannot log?Among this codes, which is best:
if ($visitor['user_id'] == 0 || $visitor['user_state'] != 'email_confirm')
if ($visitor['user_id'] == 0 || $visitor['user_state'] != 'email_confirm_edit')
if ($visitor['user_id'] == 0 || $visitor['user_state'] != 'moderated')
In summary, what is the best way to allow a visitor to do something when they are legitimate, registered and have not been either discouraged or banned?
Thanks in advance for your help.