Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Our passwords are handled by an external LDAP server and the plugin we're using to therefore removes all references to the ability to change passwords.

What I'd like to do then, is add a link to the users profile editing page (where they get taken after clicking on their name) which points to our password change page.

How do I add a link here?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I assume you mean /wp-admin/profile.php page and want to hide native password fields.

Try this (just test if form works ok with it):

add_filter( 'show_password_fields', 'modify_profile_password' );

function modify_profile_password( $show ) {

    ?>
    <tr id="password">
    <th>Change your password at</th>
    <td><a href="">password change page</a></td>
    </tr>
    <?php

    return false;
}
share|improve this answer
    
Sorry for being an idiot, but do I put this in functions.php or in its own file located in the plugins folder? –  Tom Wright Sep 14 '10 at 11:02
    
Should work fine in functions.php (written and tested that way). –  Rarst Sep 14 '10 at 11:04
    
Works beautifully. Actually surprised me because the LDAP plugin must have already used that hook to prevent the field from showing. –  Tom Wright Sep 16 '10 at 20:50
    
WP API, working as it should. Not surprising when plugins try to do same thing. Would be slightly more tricky if one tried to hide and other to show fields. –  Rarst Sep 17 '10 at 3:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.