Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1767

Joomla! 5.x Coding • Re: How to check if user is admin in an article.

$
0
0
You did not say where you want to add your code: frontend or backend, display or edit. Anyway, try this where you want to modify your code:

Code:

<?php var_dump($this->canDo->get('core.admin')); ?>
It will show bool(true) if admin access is allowed.

The rest of your code does not mean anything to me!

Statistics: Posted by ceford — Thu Jul 04, 2024 2:30 am



Viewing all articles
Browse latest Browse all 1767

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>