February 17, 2011

EE Passwd Plugin

EE1 Allows users to change their password. Features:

Get the EE Passwd Plugin from GitHub.

Documentation

Parameters

Variables

Conditionals

Example

The example below allows a user to change their password and requires their existing password if it's not in the expired list.

{exp:passwd
    expired_passwords="changeme|firstlogin"
    old_password="oldpass"
    new_password="newpass"
    secure="y"
}
{if changed}
    <p>Password Changed!</p>
{if:elseif error}
    <p>Passwords did not match, were blank, or were not secure.</p>
{/if}
{if password_expired}
    {passwd_form}
    New Password: <input type="password" name="newpass[1]" /><br/>
    New Password: <input type="password" name="newpass[2]" /><br/>
    <input type="submit" value="Change" />
    {/passwd_form}
{if:else}
    {passwd_form}
    Existing Password: <input type="password" name="oldpass" /><br/>
    New Password: <input type="password" name="newpass[1]" /><br/>
    New Password: <input type="password" name="newpass[2]" /><br/>
    <input type="submit" value="Change" />
    {/passwd_form}
{/if}
{/exp:passwd}