Custom Profile Plugin 1.1.0 Released


Version 1.1.0 of the Custom Profile plugin is now available for .  This version includes several new features and fixes or improves on existing features:

  • Custom user lists can be created to display selected profile fields to certain users.  Users may elect to block their profile from appearing in these lists.
  • An icon is displayed to indicate which fields are required and which are public (visible by Members and Anonymous users).
  • An "info" icon is displayed if a field has a help message associated with it.  Hovering over the icon displays the field's help message.

Some significant changes were made behind the scenes to make these features possible. 

This version of the plugin uses a completely different method of storing profile data than prior versions.  Until now, data was stored in the database as name-value pairs.  This was very flexible and safe, but did not lend itself well to extracting the full profile for many users, which is exactly what the custom lists require.

Starting with version 1.1.0, the profile data is stored in a single record per user.  Adding or modifying fields means that the schema of the data table imay be changed.  One of the first things that you may notice is that the field names (the actual names, not the prompt text) have changed to make sure they're safe to use as column names.  There is a lot of processing done during the upgrade, so it's extremely important that you back up your database before upgrading from a previous version.  A new table (gl_profile_data) will be created to hold the profile data, but as a failsafe the old table is not deleted.

Three new fields are automatically added to the profile_data table.  These fields are required and can be used by other plugins (specifically the upcoming Subscription plugin version).  They cannot be deleted or have their types changed, but they can be disabled.

  • sys_directory: Allows users to decide whether their custom profile data will be visible in any lists created by the administrator.  Disabling this field means that the profile fields for all users are shown.  This visibility is different than the per-field permissions set by the administrator.
  • sys_membertype: This field is a simple text field that can be used to indicate the type of member.
  • sys_expires: This is a date field that can be used to indicate the expiration of a club or site membership.  The next release of the Subscription plugin will include an option to automatically update this field and the "sys_membertype" field.

The field permissions have also been updated.  Previously the administrator could set a field as "read-only", which prevented it from being edited by the owner (the user with which the field is associated).  In this release, there is no separate checkbox to indicate that a field is read-only; instead the Owner's permission can be set to Read, Edit, or None.  If "None", the field is hidden from the owner.  This way the administrator can use fields to store information that the affected user should not see.  If "Read", but not "Edit", then the field is read-only.

The per-field permissions are set by the administrator and determine which fields appear in the user's profile when viewed by different types of users- logged-in or anonymous.  Custom lists do not honor the per-field permissions, so the administrator should be very aware of who is given View access to these lists.

There are only a few new configuration options:

  • Display empty values?  If this is "No" then any profile fields that are empty will not be shown at all in the user's profile.  If "Yes", then the prompt text is displayed normally with no data following it.
  • Arrears Grace Period
    Expiration Grace Period
    - These indicate the days after expiration, according to the sys_expires field, when an account is in arrears or is expired.  If the sys_expires field is not used, then these have no effect.  The are used only to highlight expired accounts in the member list.
  • Date Format - This allows the administrator to choose the default date format for new fields.  NOTE: If you have already set up date fields, you will need to edit each of those fields and select the date format.  Until that is done, dates will be displayed in their native SQL format (YYYY-MM-DD).

This release has been in the works for a while, and although testing and a limited production release have shown no issues, be sure to back up your site and its database before installing or upgrading.

Known Issues:

  • Selection values for "dropdown" fields weren't being extracted properly which resulted in a fatal PHP error.  The plugin package has been updated as "profile-1.1.0a-1.2.0.tar.gz" today (17 Jul 2011).  If you were one of the first to download the original package and you experience this error, you can apply the updated class file from this post.
  • Required fields prevent the administrator from adding users, since the custom profile fields don't appear on the New User form.  Apply the functions.inc file from the end of this discussion to work around the problem.

Share It!