WordPress.org

Make WordPress Core

Changeset 1520


Ignore:
Timestamp:
08/08/2004 08:38:19 PM (17 years ago)
Author:
rboren
Message:

Use user ID for author permalink if sanitize_title returns an empty string. Bug 0000116.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r1515 r1520  
    6565$new_lastname    = $_POST['new_lastname'];
    6666$new_nickname    = $_POST['new_nickname'];
    67 $new_nicename    = sanitize_title($new_nickname);
     67$new_nicename    = sanitize_title($new_nickname, $user_id);
    6868$new_icq         = $_POST['new_icq'];
    6969$new_aim         = $_POST['new_aim'];
  • trunk/wp-admin/users.php

    r1507 r1520  
    7171    }
    7272
    73     $user_nicename = sanitize_title($user_nickname);
     73    $user_ID = $wpdb->get_var("SELECT ID FROM $wpdb->users ORDER BY ID DESC LIMIT 1") + 1;
     74
     75    $user_nicename = sanitize_title($user_nickname, $user_ID);
    7476    $user_uri = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $user_uri) ? $user_uri : 'http://' . $user_uri;
    7577    $now = gmdate('Y-m-d H:i:s');
Note: See TracChangeset for help on using the changeset viewer.