The Joomla! Extensions Directory ™


MGetUsrName Plugin

Returns the current users username or "Guest: if no one is logged in. This tool can be helpful when the users' username needs to be displayed.

Instructions:

Enter in {mgetusrname} into a content item.

Report

2010-11-21
Reviews: 1
Does exactly what it says it will, and installs in a couple of minutes. The simple hack below also allows some customisation of displayed fields.
2010-03-07
Reviews: 12
I want to throw my 2¢ worth in here for this great plugin.

I noticed that one reviewer wanted to be able to show the member's name instead of the username and I just went into the plugins folder on the server and looked in the content folder & found the MGetUsrName.php file (/public_html or www/plugins/content/MGetUsrName.php) and found this line where it says
=======
else $username = $user->username;
=======
and replaced it with
=======
else $username = $user->name; and it worked.
=======
It placed the member's name in the article instead of the username but it would be nice to be able to do this without editing the script and, yes it would be nice to be able to choose either/or or even both if u wanted to but I like it just the same like it is.

I'm not a programmer just a really good hack so it kept me on my toes and brushed up on my skill of ... well you know. LOL

Shalom,
Frank
2009-10-04
Reviews: 1
This is amazing! Yes small but amazing, simple and elegant. This works to provide the SID in using affiliate tracking links. Perfect.
2009-09-04
Reviews: 1
Very nice and clean plugin. I used another free joomla.org module that allows content used as a module. That way I used this plugin to insert the username in the sidebar.

1 problem though - A lot of users will use a funky username but I would rather display thier first name instead.

Maybe future updates will allow for changing the parameters to choose which name to use, or maybe even display both the Name and Username.
2009-05-05
Reviews: 3
I've entered in {mgetusrname} into a module item but it's not worked, it write {mgetusrname}. In an article item it's ok, but I need user name in a module item.
Owner's reply

This plugin is for content items only. If you still need user info in a module you can try programming one yourself, the documentation and forums are a good place to start.