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.
Be one of the first to reply to this post!

Leaderboard (30 days)

Paul Frankowski

Paul Frankowski

Total Accepted Answers: 129
Sifat

Sifat

Total Accepted Answers: 81
Toufiq

Toufiq

Total Accepted Answers: 66
Pavel

Pavel

Total Accepted Answers: 6
Rifat Wahid Alif

Rifat Wahid Alif

Total Accepted Answers: 5

114

Templates

293356

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