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
how to hide link
#8
Sure...so if you want to show a link (or anything) only if the user is logged in, wrap the whole thing in this.

Code:
if($user->isLoggedIn()){
Code:
//your code here
Code:
}  // close if statement.

You can also do
Code:
if(!$user->isLoggedIn()){
Code:
//your code here
Code:
}

If you only want to show code to users who are not logged in.
  Reply


Messages In This Thread
how to hide link - by ejaw - 07-14-2016, 12:47 PM
how to hide link - by mudmin - 07-14-2016, 01:29 PM
how to hide link - by ejaw - 07-15-2016, 10:57 AM
how to hide link - by picassoo - 10-05-2016, 04:18 AM
how to hide link - by ejaw - 11-02-2016, 01:51 PM
how to hide link - by dan - 11-07-2016, 12:39 AM
how to hide link - by sire - 03-14-2017, 10:13 PM
how to hide link - by mudmin - 03-15-2017, 04:22 AM
how to hide link - by sire - 03-19-2017, 05:37 AM
how to hide link - by JUG - 03-19-2017, 07:20 AM
how to hide link - by JUG - 03-19-2017, 07:30 AM
how to hide link - by sire - 03-19-2017, 08:14 AM
how to hide link - by JUG - 03-19-2017, 08:38 AM
how to hide link - by sire - 03-19-2017, 08:43 AM
how to hide link - by sire - 03-19-2017, 08:46 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)