Undefined function get_current_user() when editing user.css

Everything to do with Joomla! 5.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
RonHagley
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Apr 14, 2024 5:27 pm

Undefined function get_current_user() when editing user.css

Post by RonHagley » Sun Apr 14, 2024 5:44 pm

When I try to edit the user.css file in media/template/site/cassiopeia/css/ Ige the error shown in the attached jpg when I try to save the changes
joomla error report.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by toivo on Sun Apr 14, 2024 10:20 pm, edited 1 time in total.
Reason: mod note: retitled

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17505
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Undefined function get_current_user() when editing user.css

Post by toivo » Sun Apr 14, 2024 10:25 pm

Welcome to the Joomla forum!

The function get_current_user() is a native PHP function. Ask your host to enable this inbuilt function.
Toivo Talikka, Global Moderator

RonHagley
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Apr 14, 2024 5:27 pm

Re: Undefined function get_current_user() when editing user.css

Post by RonHagley » Mon Apr 15, 2024 9:16 am

Thank you so much for your valued information, I will contact hosting service for action.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17505
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Undefined function get_current_user() when editing user.css

Post by toivo » Mon Apr 15, 2024 10:00 am

If your host says it is a possible security issue, use the File Manager and its Edit function to access the file from cPanel or a similar page, provided by your host.
Toivo Talikka, Global Moderator

User avatar
Kubik-Rubik
Joomla! Explorer
Joomla! Explorer
Posts: 272
Joined: Wed Aug 25, 2010 1:59 pm
Location: Karlsruhe - Germany
Contact:

Re: Undefined function get_current_user() when editing user.css

Post by Kubik-Rubik » Mon Apr 15, 2024 10:08 am

Some background:

We only use this built-in function in one place in the entire Joomla! core code. It is used in the Template component when a file is stored on the file system, and its owner is set to the owner of the currently executed PHP script to make it writable.
Cheers
Viktor

Kubik-Rubik Joomla! Extensions https://kubik-rubik.de
Former member of Joomla! Production Leadership Team, Security Strike Team and Bug Squash Team


Post Reply

Return to “Templates for Joomla! 5.x”