The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Users Only
#2
(10-10-2018, 03:27 AM)KyleJ1445566 Wrote: Hey,

I am trying to get the some of the content on the index page for logged in users only and I am having difficulty. I have supplied a screen shot of the content I wish for only logged in users.

Any help would be appreciated and thank you in advance.

I'm not seeing a screenshot, but basically what you have to do is to wrap the two sections (logged in vs logged out) in this if/else statement


PHP Code:
if(isset($user) && $user->isLoggedIn()){
 
//this content is seen by logged in users
}else{
//this content is seen by logged out users.

  Reply


Messages In This Thread
Users Only - by KyleJ1445566 - 10-10-2018, 03:27 AM
RE: Users Only - by mudmin - 10-10-2018, 08:52 AM
RE: Users Only - by KyleJ1445566 - 10-10-2018, 03:13 PM
RE: Users Only - by mudmin - 10-10-2018, 06:15 PM
RE: Users Only - by Brandin - 10-10-2018, 05:35 PM
RE: Users Only - by KyleJ1445566 - 10-10-2018, 08:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)