Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable content for logged in user
#1
Hi,

I'd like to to disable a piece of content for the admin. Is there a conditional that I can use? Something like
Code:
<?php if user_id = admin ?> content  <?php } ?>

Thanks.
Reply
#2
It seems I have found the solution.
Code:
<?php if (!isset($_COOKIE['GS_ADMIN_USERNAME'])) {
    $cookie_user_id = _id($_COOKIE['GS_ADMIN_USERNAME']); ?>
<?php } ?>
Reply
#3
please tell me for what the admin will be restricted?
What is the sense behind that?

She/He will always be able to edit php-files or theme-files

I just don't get it, that's why I ask

Cheers, Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#4
Hi,

I just wanted to hide the ads and google analytics code to exclude own visits Smile
Reply
#5
[/root.] Wrote:Hi,

I just wanted to hide the ads and google analytics code to exclude own visits Smile


oh, I understand
but I do not know of any way to acchieve this, maybe some of our developers here?
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#6
The code I posted above is working fine Smile
Reply




Users browsing this thread: 2 Guest(s)