Make WordPress Core

Changeset 3120 for trunk/wp-login.php


Ignore:
Timestamp:
11/17/2005 12:51:34 AM (20 years ago)
Author:
matt
Message:

New logo, better login.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r3044 r3120  
    171171    $redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $redirect_to);
    172172
    173     if( !empty($_POST) ) {
     173    if( $_POST ) {
    174174        $user_login = $_POST['log'];
     175        $user_login = sanitize_user( $user_login );
    175176        $user_pass  = $_POST['pwd'];
    176177        $rememberme = $_POST['rememberme'];
     
    186187    do_action('wp_authenticate', array(&$user_login, &$user_pass));
    187188
    188     if ($user_login && $user_pass) {
     189    if ( $_POST ) {
    189190        $user = new WP_User($user_login);
    190 
     191   
    191192        // If the user can't edit posts, send them to their profile.
    192193        if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )
    193             $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php';
    194 
     194            $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php';
     195   
    195196        if ( wp_login($user_login, $user_pass, $using_cookie) ) {
    196197            if ( !$using_cookie )
     
    217218    window.onload = focusit;
    218219    </script>
    219     <style type="text/css">
    220     #log, #pwd, #submit {
    221         font-size: 1.7em;
    222     }
    223     </style>
    224220</head>
    225221<body>
     
    233229
    234230<form name="loginform" id="loginform" action="wp-login.php" method="post">
    235 <p><label><?php _e('Username:') ?><br /><input type="text" name="log" id="log" value="" size="20" tabindex="1" /></label></p>
     231<p><label><?php _e('Username:') ?><br /><input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" size="20" tabindex="1" /></label></p>
    236232<p><label><?php _e('Password:') ?><br /> <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label></p>
    237233<p>
Note: See TracChangeset for help on using the changeset viewer.