Plugin Information
Member Info 1.0
- Author:
- Yoshi
- Published:
- Oct 27, 2004
- Last Updated:
- Dec 01, 2008
- License:
- Freeware
- Categories:
- Plugins Membership
Displays the value of a field in the exp_members table according to
member_id.
Example Usage
{exp:pd_memberinfo field='last_visit'}
{member_id}
{/exp:pd_memberinfo}
Notes
PARAMETERS:field='last_visit'
(no default - must be specified)
The field parameter defines what field in the exp_members table you wish to display. In the example, it will show the last_visit date. This field is required. If you do not specify a field, the plugin will return a blank result.
date_format='%m/%d/%y'
(default)
This is the date time format if the result is a date. It defaults to %m/%d/%y if you do not specify it, so leaving this out is usually a safe bet.
NOTES ABOUT THIS TAG:
The only thing between the opening and closing tag should be the 0. This can be a numeric number (if it is not numeric the plugin will return a blank result) or it can be like stated in the example, 0.
At this point, I've only tested this in within the Comments tag, but I see no reason why this wouldn't work anywhere else where the 0 field is valid. It should work anywhere if you hard code the member id, eg. {exp:pd_memberinfo field="last_visit"}1{/exp:pd_memberinfo}, however, it will only return information for THAT user.
There was a bit of thought on why the member_id shouldn't be just passed through as a parameter. Well, when using the 0 variable within a comment tag, for example, it did not function correctly. I thought about it, and with this simple approach, this is the safest and easiest way to display a member field that resides in the exp_members table.
This plugin does NOT display custom member variables. This can already be accomplished within EE.
ADDITIONAL NOTES:
Should you specify an invalid table field, the plugin should detect this and return empty data. So if nothing shows up, please check the spelling of the field parameter value and try again.
If you are not sure what possible field names you can use, you can find out by going to: Control Panel > Admin > SQL Manager > Manage Database Tables > Browse (for exp_members). There you will see the fieldnames on the top row of all that information in bold.
If you specify password as the field, this plugin will return no information. This is intended.

