Support Forums

Support Offline : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

How to check whether Super User is logged in inside custom Joomla Module?

Featured Lock Resolved Issue
Hi,

I am creating a custom page in SP Page Builder using addon Joomla Module.

I tried adding below code inside my custom module:
$user = JFactory::getUser();

$id = $user->id;

echo $id;

and it always returns zero.

There is a SP Page i want to show only when admin is logged-in.

Can we do that or why user details are missing even if i am logged in using admin username and password.

Any help is appreciated.

1 Answers

Sifat - Staff

More than a month ago #Permalink
Hi,
Thanks for your query. Your question resembles that you need some custom help. I wish i could help you. But custom support is beyond our support range that's why i'm extremely sorry.
But you can check this link to get some ideas https://stackoverflow.com/questions/33142602/joomla-how-to-check-if-admin-is-logged-in

Or you can share your query here https://forum.joomla.org/

-Best Regards


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Leaderboard (30 days)

Sifat

Sifat

Total Accepted Answers: 137
Paul Frankowski

Paul Frankowski

Total Accepted Answers: 123
Toufiq

Toufiq

Total Accepted Answers: 64
Pavel

Pavel

Total Accepted Answers: 5
Mohammed Ahmed

Mohammed Ahmed

Total Accepted Answers: 2

100+

Templates

200,000+

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us