![]() |
Permission code
What would the code be to not allow unregistered users go to my custom pages? Either template code or html will work.
Thanks in advance. |
PHP:
PHP Code:
Code:
<if condition="$bbuserinfo[userid] == 0">User isn't currently signed in</if> |
I use a slightly different code. I must have gotten it from vb somewhere, cuz I don't just make these up. :)
PHP Code:
|
Or
if(!$vbulletin->userinfo['userid']) |
Go with Boofo's I'd say :p
In a template: <if condition="!$bbuserinfo['userid']">....</if> |
Quote:
|
Thx guys for all the help, I would have to say that i like Lynne's code the most. Mostly cause i dont want a custom error message i just need to prevent unregistered users to access a custom page i created and getting the defualt message is perfect.
|
Quote:
|
If it is not set, it will NOT return 0. If it is not set how should PHP even know it is numeric?
|
Quote:
|
That only works if you make a boolean comparison. ;)
Will work in both NULL and 0: PHP Code:
PHP Code:
|
Nope, as "==" means is equal to (and does not check type). A null value is equal to "false" and "zero" when comparing with "==". I think you're mixing up "==" with "===" (equal to and equal in type).
Try: PHP Code:
|
My mistake, you are correct on this.
|
where do i edit this
|
What exactly are you looking to do?
|
im trying to put a no permission messaged based on usergroup. guests get different message then registered users (who cannot access certain forums)
|
Quote:
|
All times are GMT. The time now is 03:51 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|