---
title: 'Coding tips'
url: 'https://manuals.remository.com/useful/joomla-matters/coding-tips'
markdown: 'https://manuals.remository.com/useful/joomla-matters/coding-tips.md'
date: '2026-10-06'
description: 'To get the current user object: Factory::getApplication()->getIdentity(); To fix old Joomla classes beginning with J and add appropriate use statements, use script convertJ (in /usr/local/sbin). Usage: convertJ --file=path/to/file.php [--dry-run] or convertJ --dir=path/to/directory [--dry-run]'
---

[](#) [ edit this page](https://github.com/getgrav/grav-skeleton-rtfm-site/blob/develop/pages/02.joomla-matters/03.coding-tips/docs.md) 

# Coding tips

To get the current user object:

`Factory::getApplication()->getIdentity();`

To fix old Joomla classes beginning with J and add appropriate use statements, use script convertJ (in /usr/local/sbin). Usage:

`convertJ --file=path/to/file.php [--dry-run]`or `convertJ --dir=path/to/directory [--dry-run]`

---

## Navigation

- Parent: [Joomla matters](https://manuals.remository.com/useful/joomla-matters.md)
- Previous: [A few development pointers](https://manuals.remository.com/useful/joomla-matters/a-few-development-pointers.md)
