How to Know Who Has Checked Out an Article/Menu Item/Module in Joomla

We have explained How to unlock a Joomla article before – and many of our clients and our readers benefited from our post – since we explained several ways on how to unlock any locked content on Joomla, whether it’s an article, a menu item, or a module.

However, we got a question from one of our clients today: “How do I know who locked this article?”

Well, there are two methods to know who locked a certain content on Joomla:

Method #1

Hover your mouse over the “lock” icon next to the article (or the module’s or the menu item’s) title, and you’ll find who locked the article, and when. Here’s an example:

Joomla checkin

Figure 1: Joomla checkin popup

As you can see, you’ll be able to know the following information:

  • Who locked the article
  • When (the exact date and time) the lock took place

Method #2

The second method is considerably more complicated than the first one as it requires the use of phpMyAdmin. Here’s how you do this:

  • Login to phpMyAdmin.
  • Go to the affected table – for example, if the locked in item is an article, then go to the table jos_content, if the locked in item is a category, then go to the table jos_categories, if the locked in item is a module, then go to the table jos_modules. Note that you need to replace jos_ with your table alias in case you’re using another one.

  • Search for the article (or the menu item/module/etc…) that is locked. You can search by the id, the title, etc… Once you find it, click on it, and then check the checked_out field. The checked_out field will contain the id of the user that has locked this article.

  • Now go to the table jos_users and search for the user that has the id returned from the previous step.

A quick query that you can run on phpMyAdmin to know the name of the user who locked in an item (if you know the item id) is the following:

SELECT `jos_users`.name
FROM `jos_users` , `jos_content`
WHERE checked_out = `jos_users`.id
AND `jos_content`.id = a random content id

Of course you need to change jos_ to your alias, and you need to replace the content table with your corresponding table.

Here are some fun queries that you can use to get some interesting data on the locking:

  • To know the names of all the people who have articles locked:

    SELECT DISTINCT `jos_users`.name
    FROM `jos_users` , `jos_content`
    WHERE checked_out = `jos_users`.id
    AND `jos_content`.id = "a random content id" ORDER BY `jos_users`.name ASC

  • To know the name of the person who has the highest number of locked articles:

    SELECT `jos_users`.name, count( * ) AS "Number of articles locked"
    FROM `jos_users` , `jos_content`
    WHERE checked_out = `jos_users`.id
    GROUP BY `jos_users`.name
    ORDER BY count( * ) DESC
    LIMIT 0 , 1

  • To know the total number of articles that are locked:

    SELECT count( * ) AS "Number of articles locked"
    FROM `jos_content
    WHERE checked_out > 0

If you want more help with Joomla’s locking feature then feel free to contact us anytime you want. We are fast, we are efficient, our rates are affordable, and we are really, really friendly!

No comments yet.

Leave a comment