Make WordPress Core

Changeset 4339 for trunk/wp-login.php


Ignore:
Timestamp:
10/04/2006 04:47:50 PM (18 years ago)
Author:
ryan
Message:

Improved login from Viper007Bond. fixes #3123

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r4186 r4339  
    33
    44$action = $_REQUEST['action'];
    5 $error = '';
     5$errors = array();
    66
    77if ( isset($_GET['key']) )
     
    2121}
    2222
    23 switch($action) {
    24 
    25 case 'logout':
    26 
    27     wp_clearcookie();
    28     do_action('wp_logout');
    29     nocache_headers();
    30 
    31     $redirect_to = 'wp-login.php';
    32     if ( isset($_REQUEST['redirect_to']) )
    33         $redirect_to = $_REQUEST['redirect_to'];
    34 
    35     wp_redirect($redirect_to);
    36     exit();
    37 
    38 break;
    39 
    40 case 'lostpassword':
    41 do_action('lost_password');
    42 ?>
     23
     24// Rather than duplicating this HTML all over the place, we'll stick it in function
     25function login_header($title = 'Login', $message = '') {
     26    global $errors, $error;
     27
     28    ?>
    4329<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    4430<html xmlns="http://www.w3.org/1999/xhtml">
    4531<head>
    46     <title>WordPress &raquo; <?php _e('Lost Password') ?></title>
     32    <title><?php bloginfo('name'); ?> &rsaquo; <?php echo $title; ?></title>
    4733    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    48     <link rel="stylesheet" href="<?php echo get_option('siteurl'); ?>/wp-admin/wp-admin.css" type="text/css" />
     34    <link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
     35    <!--[if IE]><style type="text/css">#login h1 a { margin-top: 35px; } #login ul { padding-bottom: 65px; }</style><![endif]--><!-- Curse you, IE! -->
    4936    <script type="text/javascript">
    50     function focusit() {
    51         // focus on first input field
    52         document.getElementById('user_login').focus();
    53     }
    54     window.onload = focusit;
     37        function focusit() {
     38            document.getElementById('user_login').focus();
     39        }
     40        window.onload = focusit;
    5541    </script>
    56     <style type="text/css">
    57     #user_login, #email, #submit {
    58         font-size: 1.7em;
    59     }
    60     </style>
     42<?php do_action('login_head'); ?>
    6143</head>
    6244<body>
     45
    6346<div id="login">
    64 <h1><a href="http://wordpress.org/">WordPress</a></h1>
    65 <p><?php _e('Please enter your information here. We will send you a new password.') ?></p>
    66 <?php
    67 if ($error)
    68     echo "<div id='login_error'>$error</div>";
     47<h1><a href="<?php echo apply_filters('login_headerurl', 'http://wordpress.org/'); ?>" title="<?php echo apply_filters('login_headertitle', __('Powered by WordPress')); ?>"><span class="hide"><?php bloginfo('name'); ?></span></a></h1>
     48<?php
     49    if ( !empty( $message ) ) echo apply_filters('login_message', $message) . "\n";
     50
     51    // Incase a plugin uses $error rather than the $errors array
     52    if ( !empty( $error ) ) {
     53        $errors['error'] = $error;
     54        unset($error);
     55    }
     56
     57    if ( !empty( $errors ) ) {
     58        if ( is_array( $errors ) ) {
     59            $newerrors = "\n";
     60            foreach ( $errors as $error ) $newerrors .= '   ' . $error . "<br />\n";
     61            $errors = $newerrors;
     62        }
     63
     64        echo '<div id="login_error">' . apply_filters('login_errors', $errors) . "</div>\n";
     65    }
     66} // End of login_header()
     67
     68
     69switch ($action) {
     70
     71case 'logout' :
     72
     73    wp_clearcookie();
     74    do_action('wp_logout');
     75
     76    $redirect_to = 'wp-login.php?loggedout=true';
     77    if ( isset( $_REQUEST['redirect_to'] ) )
     78        $redirect_to = $_REQUEST['redirect_to'];
     79
     80    wp_redirect($redirect_to);
     81    exit();
     82
     83break;
     84
     85case 'lostpassword' :
     86case 'retrievepassword' :
     87    $user_login = '';
     88    $user_pass = '';
     89
     90    if ( $_POST ) {
     91        if ( empty( $_POST['user_login'] ) )
     92            $errors['user_login'] = __('<strong>ERROR</strong>: The username field is empty.');
     93        if ( empty( $_POST['user_email'] ) )
     94            $errors['user_email'] = __('<strong>ERROR</strong>: The e-mail field is empty.');
     95
     96        do_action('lostpassword_post');
     97       
     98        if ( empty( $errors ) ) {
     99            $user_data = get_userdatabylogin(trim($_POST['user_login']));
     100            // redefining user_login ensures we return the right case in the email
     101            $user_login = $user_data->user_login;
     102            $user_email = $user_data->user_email;
     103
     104            if (!$user_email || $user_email != $_POST['user_email']) {
     105                $errors['invalidcombo'] = __('<strong>ERROR</strong>: Invalid username / e-mail combination.');
     106            } else {
     107                do_action('retreive_password', $user_login);  // Misspelled and deprecated
     108                do_action('retrieve_password', $user_login);
     109
     110                // Generate something random for a password... md5'ing current time with a rand salt
     111                $key = substr( md5( uniqid( microtime() ) ), 0, 8);
     112                // Now insert the new pass md5'd into the db
     113                $wpdb->query("UPDATE $wpdb->users SET user_activation_key = '$key' WHERE user_login = '$user_login'");
     114                $message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n";
     115                $message .= get_option('siteurl') . "\r\n\r\n";
     116                $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
     117                $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n";
     118                $message .= get_option('siteurl') . "/wp-login.php?action=rp&key=$key\r\n";
     119
     120                if (FALSE == wp_mail($user_email, sprintf(__('[%s] Password Reset'), get_option('blogname')), $message)) {
     121                    die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
     122                } else {
     123                    wp_redirect('wp-login.php?checkemail=confirm');
     124                    exit();
     125                }
     126            }
     127        }
     128    }
     129
     130    if ( 'invalidkey' == $_GET['error'] ) $errors['invalidkey'] = __('Sorry, that key does not appear to be valid.');
     131
     132    do_action('lost_password');
     133    login_header(__('Lost Password'), '<p class="message">' . __('Please enter your username and e-mail address. You will recieve a new password via e-mail.') . '</p>');
    69134?>
    70135
    71 <form name="lostpass" action="wp-login.php" method="post" id="lostpass">
    72 <p>
    73 <input type="hidden" name="action" value="retrievepassword" />
    74 <label><?php _e('Username:') ?><br />
    75 <input type="text" name="user_login" id="user_login" value="" size="20" tabindex="1" /></label></p>
    76 <p><label><?php _e('E-mail:') ?><br />
    77 <input type="text" name="email" id="email" value="" size="25" tabindex="2" /></label><br />
    78 </p>
    79 <p class="submit"><input type="submit" name="submit" id="submit" value="<?php _e('Retrieve Password &raquo;'); ?>" tabindex="3" /></p>
     136<form name="lostpasswordform" id="lostpasswordform" action="wp-login.php?action=lostpassword" method="post">
     137    <p>
     138        <label><?php _e('Username:') ?><br />
     139        <input type="text" name="user_login" id="user_login" class="input" value="<?php echo wp_specialchars(stripslashes($_POST['user_login']), 1); ?>" size="20" tabindex="10" /></label>
     140    </p>
     141    <p>
     142        <label><?php _e('E-mail:') ?><br />
     143        <input type="text" name="user_email" id="user_email" class="input" value="<?php echo wp_specialchars(stripslashes($_POST['user_email']), 1); ?>" size="25" tabindex="20" /></label>
     144    </p>
     145<?php do_action('lostpassword_form'); ?>
     146    <p class="submit"><input type="submit" name="submit" id="submit" value="<?php _e('Get New Password &raquo;'); ?>" tabindex="100" /></p>
    80147</form>
    81148<ul>
     149<?php if (get_option('users_can_register')) : ?>
     150    <li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php"><?php _e('Login') ?></a></li>
     151    <li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=register"><?php _e('Register') ?></a></li>
     152    <li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>" class="fullwidth">&laquo; <?php _e('Back to blog') ?></a></li>
     153<?php else : ?>
    82154    <li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>">&laquo; <?php _e('Back to blog') ?></a></li>
    83 <?php if (get_option('users_can_register')) : ?>
    84     <li><a href="<?php bloginfo('wpurl'); ?>/wp-register.php"><?php _e('Register') ?></a></li>
     155    <li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php"><?php _e('Login') ?></a></li>
    85156<?php endif; ?>
    86     <li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php"><?php _e('Login') ?></a></li>
    87157</ul>
    88158</div>
     
    92162break;
    93163
    94 case 'retrievepassword':
    95     $user_data = get_userdatabylogin(trim($_POST['user_login']));
    96     // redefining user_login ensures we return the right case in the email
    97     $user_login = $user_data->user_login;
    98     $user_email = $user_data->user_email;
    99 
    100     if (!$user_email || $user_email != $_POST['email'])
    101         wp_die(sprintf(__('Sorry, that user does not seem to exist in our database. Perhaps you have the wrong username or e-mail address? <a href="%s">Try again</a>.'), 'wp-login.php?action=lostpassword'));
    102 
    103 do_action('retreive_password', $user_login);  // Misspelled and deprecated.
    104 do_action('retrieve_password', $user_login);
    105 
    106     // Generate something random for a password... md5'ing current time with a rand salt
    107     $key = substr( md5( uniqid( microtime() ) ), 0, 8);
    108     // now insert the new pass md5'd into the db
    109     $wpdb->query("UPDATE $wpdb->users SET user_activation_key = '$key' WHERE user_login = '$user_login'");
    110     $message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n";
    111     $message .= get_option('siteurl') . "\r\n\r\n";
    112     $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
    113     $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n";
    114     $message .= get_option('siteurl') . "/wp-login.php?action=rp&key=$key\r\n";
    115 
    116     $m = wp_mail($user_email, sprintf(__('[%s] Password Reset'), get_option('blogname')), $message);
    117 
    118     if ($m == false) {
    119          echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
    120          echo  __('Possible reason: your host may have disabled the mail() function...') . "</p>";
    121         die();
    122     } else {
    123         echo '<p>' .  sprintf(__("The e-mail was sent successfully to %s's e-mail address."), $user_login) . '<br />';
    124         echo  "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
    125         die();
    126     }
    127 
    128 break;
    129 
    130164case 'resetpass' :
    131165case 'rp' :
     166    $key = preg_replace('/a-z0-9/i', '', $_GET['key']);
     167    if ( empty( $key ) ) {
     168        wp_redirect('wp-login.php?action=lostpassword&error=invalidkey');
     169        exit();
     170    }
     171
     172    $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE user_activation_key = '$key'");
     173    if ( empty( $user ) ) {
     174        wp_redirect('wp-login.php?action=lostpassword&error=invalidkey');
     175        exit();
     176    }
     177
     178    do_action('password_reset');
     179
    132180    // Generate something random for a password... md5'ing current time with a rand salt
    133     $key = preg_replace('/a-z0-9/i', '', $_GET['key']);
    134     if ( empty($key) )
    135         wp_die( __('Sorry, that key does not appear to be valid.') );
    136     $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE user_activation_key = '$key'");
    137     if ( !$user )
    138         wp_die( __('Sorry, that key does not appear to be valid.') );
    139 
    140     do_action('password_reset');
    141 
    142181    $new_pass = substr( md5( uniqid( microtime() ) ), 0, 7);
    143     $wpdb->query("UPDATE $wpdb->users SET user_pass = MD5('$new_pass'), user_activation_key = '' WHERE user_login = '$user->user_login'");
     182    $wpdb->query("UPDATE $wpdb->users SET user_pass = MD5('$new_pass'), user_activation_key = '' WHERE user_login = '$user->user_login'");
    144183    wp_cache_delete($user->ID, 'users');
    145184    wp_cache_delete($user->user_login, 'userlogins');
     
    148187    $message .= get_option('siteurl') . "/wp-login.php\r\n";
    149188
    150     $m = wp_mail($user->user_email, sprintf(__('[%s] Your new password'), get_option('blogname')), $message);
    151 
    152     if ($m == false) {
    153         echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
    154         echo  __('Possible reason: your host may have disabled the mail() function...') . '</p>';
    155         die();
     189    if (FALSE == wp_mail($user->user_email, sprintf(__('[%s] Your new password'), get_option('blogname')), $message)) {
     190        die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
    156191    } else {
    157         echo '<p>' .  sprintf(__('Your new password is in the mail.'), $user_login) . '<br />';
    158         echo  "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
    159192        // send a copy of password change notification to the admin
    160193        $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
    161194        wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), get_option('blogname')), $message);
    162         die();
    163     }
     195
     196        wp_redirect('wp-login.php?checkemail=newpass');
     197        exit();
     198    }
     199break;
     200
     201case 'register' :
     202    if ( FALSE == get_option('users_can_register') ) {
     203        wp_redirect('wp-login.php?registration=disabled');
     204        exit();
     205    }
     206
     207    if ( $_POST ) {
     208        require_once( ABSPATH . WPINC . '/registration.php');
     209
     210        $user_login = sanitize_user( $_POST['user_login'] );
     211        $user_email = $_POST['user_email'];
     212
     213        // Check the username
     214        if ( $user_login == '' )
     215            $errors['user_login'] = __('<strong>ERROR</strong>: Please enter a username.');
     216        elseif ( !validate_username( $user_login ) ) {
     217            $errors['user_login'] = __('<strong>ERROR</strong>: This username is invalid.  Please enter a valid username.');
     218            $user_login = '';
     219        } elseif ( username_exists( $user_login ) )
     220            $errors['user_login'] = __('<strong>ERROR</strong>: This username is already registered, please choose another one.');
     221
     222        // Check the e-mail address
     223        if ($user_email == '') {
     224            $errors['user_email'] = __('<strong>ERROR</strong>: Please type your e-mail address.');
     225        } elseif ( !is_email( $user_email ) ) {
     226            $errors['user_email'] = __('<strong>ERROR</strong>: The email address isn&#8217;t correct.');
     227            $user_email = '';
     228        } elseif ( email_exists( $user_email ) )
     229            $errors['user_email'] = __('<strong>ERROR</strong>: This email is already registered, please choose another one.');
     230
     231        do_action('register_post');
     232
     233        if ( empty( $errors ) ) {
     234            $user_pass = substr( md5( uniqid( microtime() ) ), 0, 7);
     235
     236            $user_id = wp_create_user( $user_login, $user_pass, $user_email );
     237            if ( !$user_id )
     238                $errors['registerfail'] = sprintf(__('<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !'), get_option('admin_email'));
     239            else {
     240                wp_new_user_notification($user_id, $user_pass);
     241
     242                wp_redirect('wp-login.php?checkemail=registered');
     243                exit();
     244            }
     245        }
     246    }
     247
     248    login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>');
     249?>
     250
     251<form name="registerform" id="registerform" action="wp-login.php?action=register" method="post">
     252    <p>
     253        <label><?php _e('Username:') ?><br />
     254        <input type="text" name="user_login" id="user_login" class="input" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" size="20" tabindex="10" /></label>
     255    </p>
     256    <p>
     257        <label><?php _e('E-mail:') ?><br />
     258        <input type="text" name="user_email" id="user_email" class="input" value="<?php echo wp_specialchars(stripslashes($user_email), 1); ?>" size="25" tabindex="20" /></label>
     259    </p>
     260<?php do_action('register_form'); ?>
     261    <p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p>
     262    <p class="submit"><input type="submit" name="submit" id="submit" value="<?php _e('Register &raquo;'); ?>" tabindex="100" /></p>
     263</form>
     264<ul>
     265    <li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php"><?php _e('Login') ?></a></li>
     266    <li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a></li>
     267    <li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>" class="fullwidth">&laquo; <?php _e('Back to blog') ?></a></li>
     268</ul>
     269</div>
     270</body>
     271</html>
     272<?php
    164273break;
    165274
    166275case 'login' :
    167276default:
    168 
    169277    $user_login = '';
    170278    $user_pass = '';
    171     $using_cookie = false;
     279    $using_cookie = FALSE;
     280
    172281    if ( !isset( $_REQUEST['redirect_to'] ) )
    173282        $redirect_to = 'wp-admin/';
     
    175284        $redirect_to = $_REQUEST['redirect_to'];
    176285
    177     if( $_POST ) {
    178         $user_login = $_POST['log'];
     286    if ( $_POST ) {
     287        $user_login = $_POST['user_login'];
    179288        $user_login = sanitize_user( $user_login );
    180         $user_pass  = $_POST['pwd'];
     289        $user_pass  = $_POST['user_pass'];
    181290        $rememberme = $_POST['rememberme'];
    182291    } else {
     
    191300    do_action_ref_array('wp_authenticate', array(&$user_login, &$user_pass));
    192301
    193     if ( $user_login && $user_pass ) {
     302    if ( $user_login && $user_pass && empty( $errors ) ) {
    194303        $user = new WP_User(0, $user_login);
    195304
     
    203312            do_action('wp_login', $user_login);
    204313            wp_redirect($redirect_to);
    205             exit;
     314            exit();
    206315        } else {
    207316            if ( $using_cookie )
    208                 $error = __('Your session has expired.');
    209         }
    210     } else if ( $user_login || $user_pass ) {
    211         $error = __('<strong>Error</strong>: The password field is empty.');
    212     }
     317                $errors['expiredsession'] = __('Your session has expired.');
     318        }
     319    }
     320   
     321    if ( $_POST && empty( $user_login ) )
     322        $errors['user_login'] = __('<strong>ERROR</strong>: The username field is empty.');
     323    if ( $_POST && empty( $user_pass ) )
     324        $errors['user_pass'] = __('<strong>ERROR</strong>: The password field is empty.');
     325
     326    // Some parts of this script use the main login form to display a message
     327    if      ( TRUE == $_GET['loggedout'] )          $errors['loggedout']        = __('Successfully logged you out.');
     328    elseif  ( 'disabled' == $_GET['registration'] ) $errors['registerdiabled']  = __('User registration is currently not allowed.');
     329    elseif  ( 'confirm' == $_GET['checkemail'] )    $errors['confirm']          = __('Check your e-mail for the confirmation link.');
     330    elseif  ( 'newpass' == $_GET['checkemail'] )    $errors['newpass']          = __('Check your e-mail for your new password.');
     331    elseif  ( 'registered' == $_GET['checkemail'] ) $errors['registered']       = __('Registration complete. Please check your e-mail.');
     332
     333    login_header(__('Login'));
    213334?>
    214 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    215 <html xmlns="http://www.w3.org/1999/xhtml">
    216 <head>
    217     <title>WordPress &rsaquo; <?php _e('Login') ?></title>
    218     <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    219     <link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-admin/wp-admin.css" type="text/css" />
    220     <script type="text/javascript">
    221     function focusit() {
    222         document.getElementById('log').focus();
    223     }
    224     window.onload = focusit;
    225     </script>
    226 </head>
    227 <body>
    228 
    229 <div id="login">
    230 <h1><a href="http://wordpress.org/">WordPress</a></h1>
    231 <?php
    232 if ( $error )
    233     echo "<div id='login_error'>$error</div>";
    234 ?>
    235335
    236336<form name="loginform" id="loginform" action="wp-login.php" method="post">
    237 <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>
    238 <p><label><?php _e('Password:') ?><br /> <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label></p>
    239 <p>
    240   <label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />
    241   <?php _e('Remember me'); ?></label></p>
    242 <p class="submit">
    243     <input type="submit" name="submit" id="submit" value="<?php _e('Login'); ?> &raquo;" tabindex="4" />
    244     <input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($redirect_to); ?>" />
    245 </p>
     337    <p>
     338        <label><?php _e('Username:') ?><br />
     339        <input type="text" name="user_login" id="user_login" class="input" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" size="20" tabindex="10" /></label>
     340    </p>
     341    <p>
     342        <label><?php _e('Password:') ?><br />
     343        <input type="password" name="user_pass" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
     344    </p>
     345<?php do_action('login_form'); ?>
     346    <p><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> <?php _e('Remember me'); ?></label></p>
     347    <p class="submit">
     348        <input type="submit" name="submit" id="submit" value="<?php _e('Login'); ?> &raquo;" tabindex="100" />
     349        <input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($redirect_to); ?>" />
     350    </p>
    246351</form>
    247352<ul>
     353<?php if (get_option('users_can_register')) : ?>
     354    <li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=register"><?php _e('Register') ?></a></li>
     355    <li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a></li>
     356    <li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>" class="fullwidth">&laquo; <?php _e('Back to blog') ?></a></li>
     357<?php else : ?>
    248358    <li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>">&laquo; <?php _e('Back to blog') ?></a></li>
    249 <?php if (get_option('users_can_register')) : ?>
    250     <li><a href="<?php bloginfo('wpurl'); ?>/wp-register.php"><?php _e('Register') ?></a></li>
     359    <li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a></li>
    251360<?php endif; ?>
    252     <li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a></li>
    253361</ul>
    254362</div>
Note: See TracChangeset for help on using the changeset viewer.