Make WordPress Core


Ignore:
Timestamp:
03/09/2005 10:49:42 PM (21 years ago)
Author:
matt
Message:

Allowing more hooks into authentication - Hat tip: http://dev.webadmin.ufl.edu/~dwc/2005/03/02/authentication-plugins/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/profile.php

    r2166 r2425  
    5252    }
    5353
    54     if ($_POST["pass1"] == "") {
    55         if ($_POST["pass2"] != "")
     54    $pass1 = $_POST["pass1"];
     55    $pass2 = $_POST["pass2"];
     56    do_action('check_passwords', array($user_login, &$pass1, &$pass2));
     57
     58    if ( '' == $pass1 ) {
     59        if ( '' == $pass2 )
    5660            die (__("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice."));
    5761        $updatepassword = "";
    5862    } else {
    59         if ($_POST["pass2"] == "")
     63        if ('' == $pass2)
    6064            die (__("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice."));
    61         if ($_POST["pass1"] != $_POST["pass2"])
     65        if ( $pass1 != $pass2 )
    6266            die (__("<strong>ERROR</strong>: you typed two different passwords. Go back to correct that."));
    63         $newuser_pass = $_POST["pass1"];
     67        $newuser_pass = $pass1;
    6468        $updatepassword = "user_pass=MD5('$newuser_pass'), ";
    6569        wp_clearcookie();
     
    7074    $newuser_lastname = wp_specialchars($_POST['newuser_lastname']);
    7175    $newuser_nickname = $_POST['newuser_nickname'];
    72     $newuser_nicename = sanitize_title($newuser_nickname);
     76    $newuser_nicename = sanitize_title($newuser_nickname);
    7377    $newuser_icq = wp_specialchars($_POST['newuser_icq']);
    7478    $newuser_aim = wp_specialchars($_POST['newuser_aim']);
     
    226230      <td><textarea name="user_description" rows="5" id="textarea2" style="width: 99%; "><?php echo $profiledata->user_description ?></textarea></td>
    227231    </tr>
     232<?php
     233$show_password_fields = apply_filters('show_password_fields', true);
     234if ( $show_password_fields ) :
     235?>
    228236    <tr>
    229237      <th scope="row"><?php _e('New <strong>Password</strong> (Leave blank to stay the same.)') ?></th>
     
    232240        <input type="password" name="pass2" size="16" value="" /></td>
    233241    </tr>
     242<?php endif; ?>
    234243  </table>
    235244  <p class="submit">
Note: See TracChangeset for help on using the changeset viewer.