[wp-cvs] wordpress wp-login.php,1.32,1.33
Matthew Mullenweg
saxmatt at users.sourceforge.net
Mon Oct 4 06:45:04 UTC 2004
Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13113
Modified Files:
wp-login.php
Log Message:
Better errors.
Index: wp-login.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-login.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** wp-login.php 4 Oct 2004 06:23:53 -0000 1.32
--- wp-login.php 4 Oct 2004 06:45:01 -0000 1.33
***************
*** 91,138 ****
break;
- case 'login':
-
- if( !empty($_POST) ) {
- $log = $_POST['log'];
- $pwd = $_POST['pwd'];
- $redirect_to = preg_replace('|[^a-z/.:_-]|i', '', $_POST['redirect_to']);
- }
-
- $user = get_userdatabylogin($log);
-
- if (0 == $user->user_level) {
- $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php';
- }
-
- if ( !login($log, $pwd) ) {
- header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
- header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
- header('Cache-Control: no-cache, must-revalidate');
- header('Pragma: no-cache');
- if ($is_IIS)
- header('Refresh: 0;url=wp-login.php');
- else
- header('Location: wp-login.php');
- exit();
- } else {
- $user_login = $log;
- $user_pass = md5($pwd);
- setcookie('wordpressuser_'.$cookiehash, $user_login, time() + 31536000, COOKIEPATH);
- setcookie('wordpresspass_'.$cookiehash, md5($user_pass), time() + 31536000, COOKIEPATH);
-
- header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
- header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
- header('Cache-Control: no-cache, must-revalidate');
- header('Pragma: no-cache');
-
- if ($is_IIS)
- header("Refresh: 0;url=$redirect_to");
- else
- header("Location: $redirect_to");
- }
-
- break;
-
-
case 'lostpassword':
--- 91,94 ----
***************
*** 209,215 ****
break;
!
default:
if( !empty($_COOKIE['wordpressuser_' . COOKIEHASH]) && !empty($_COOKIE['wordpresspass_' . COOKIEHASH]) ) {
$user_login = $_COOKIE['wordpressuser_' . COOKIEHASH];
--- 165,205 ----
break;
! case 'login' :
default:
+ if( !empty($_POST) ) {
+ $log = $_POST['log'];
+ $pwd = $_POST['pwd'];
+ $redirect_to = preg_replace('|[^a-z/.:_-]|i', '', $_POST['redirect_to']);
+ }
+
+ $user = get_userdatabylogin($log);
+
+ if (0 == $user->user_level) {
+ $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php';
+ }
+
+ if ( !login($log, $pwd) ) {
+ header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
+ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
+ header('Cache-Control: no-cache, must-revalidate');
+ header('Pragma: no-cache');
+ } else {
+ $user_login = $log;
+ $user_pass = md5($pwd);
+ setcookie('wordpressuser_'.$cookiehash, $user_login, time() + 31536000, COOKIEPATH);
+ setcookie('wordpresspass_'.$cookiehash, md5($user_pass), time() + 31536000, COOKIEPATH);
+
+ header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
+ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
+ header('Cache-Control: no-cache, must-revalidate');
+ header('Pragma: no-cache');
+
+ if ($is_IIS)
+ header("Refresh: 0;url=$redirect_to");
+ else
+ header("Location: $redirect_to");
+ }
+
if( !empty($_COOKIE['wordpressuser_' . COOKIEHASH]) && !empty($_COOKIE['wordpresspass_' . COOKIEHASH]) ) {
$user_login = $_COOKIE['wordpressuser_' . COOKIEHASH];
More information about the cvs
mailing list