Stand-Alone Member Edit

This module enables you to display profile editing form form within your EE templates. Using it, you can give any look to your profile editing, give it any URL address and use all power of EE tags.

Your users can edit all their profile info, including username, password, email and custom profile fields.

Note that with this module you can only edit profile of currently logged in user.

You need to have Member module present on your system

Installation

For EE 1.x, place the directory contained in zip into your /system/modules directory. For EE 2.x, place it into your /system/expressionengine/third_party directory. Then go to 'Modules' section in your Control Panel and perform installation.

Usage

{exp:sa_member_edit:form} is the only tag you need. Just wrap anything you want to be displayed in the form inside the tag pair.

Following fields are available:
username
screen_name
password
password_confirm
email
bday_y
bday_m
bday_d
url
location
occupation
interests
aol_im
icq
yahoo_im
msn_im
bio
current_password

You can also include custom profile fields into your form using their database names (e.g. m_field_id_12) or with {custom_fields} tag pair.

If you want to enable editing of screen_name, username, or email, your users will have to submit their password with the form (field should be named current_password). For password editing, they will also need to submit password confirmation (password_confirm).

If you are using version prior to 2.1 and want to enable editing of username or password, your users will have to submit their existing username (username), new username (new_username), existing password (password), new password (new_password) and new password confirmation (new_password_confirm) with the form.

In order to change password, one needs to supply existing username with the form. If you do not want to let users change their usernames, provide username in hidden input field.

Note that if you're submitting username (and for EE1, email) with the form - you are required to submit current_password, even if the actual username change does not happen. So the suggested practice is to separate username/password change from 'general' profile editing.

If the user is not logged in, the module will return page with error message. To suppress it, specify parameter errors="off"

You can also specify to which page you want to redirect user after processing the form using return parameter.

Displaying custom fields

If you want to add custom profile fields to your profile edit form, you can either add html manually (you should use 'technical' field names in this case, as they appear in database, e.g. m_field_id_12) or use {custom_fields} tag pair.

Inside {custom_fields} tag are available following variables and conditionals:

Example

{exp:sa_member_edit:form errors="off"}

<p>Screen name: <input type="text" name="screen_name" value="{screen_name}" /></p>

<p>Email: <input type="text" name="email" value="{email}" /></p>

<p>URL: <input type="text" name="url" value="{url}" /></p>

<p>Location: <input type="text" name="location" value="{location}" /></p>

{custom_fields}
<p>{field_label}{if required}*{/if}:
{if text}
<input type="text" name="{field_name}" width="{width}" maxlength="{maxlength}" value="{field_value}" />
{/if}
{if textarea}
<textarea name="{field_name}" rows="{rows}">{field_value}</textarea>
{/if}
{if select}
<select name="{field_name}">{options}</select>
{/if}
</p>
{/custom_fields}

<p>Current password: <input type="text" name="current_password" /></p>

<input type="submit" value="Save" />

{/exp:sa_member_edit:form}

If you don't want to use {custom_fields} tag pair, then you should use the module in conjunction with {exp:member:custom_profile_data} tag.

{exp:sa_member_edit:form errors="off"}
{exp:member:custom_profile_data}
<input type="text" name="m_field_1" value="{my_field_name}" />
<input type="submit" value="Save" />

{exp:member:custom_profile_data}
{/exp:sa_member_edit:form}

Editing member categories

If you have Member categories module installed, you can use SA Member Edit to enable users editing their categories on the frontend.

To do that, place {exp:sa_member_edit:categories_form} tag pair somewhere in your templates. The tag pair has only one variable — {categories}, which return pre-formatted list of categories checkboxes. If you want to edit the way categories are displayed, you need to edit categories.php file in views folder.

My categories:
{exp:sa_member_edit:categories_form}
{categories}
<input type="submit" value="Save" />
{/exp:sa_member_edit:categories_form}

You can also use 'main' sa_member_edit form to edit categories. To do this, simply add {member_categories} variable wherever you want to display block of checkboxes.

Top of page