From d46cb287368ecf3fc38a5bf728c440b889f8a213 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Sun, 1 Feb 2004 11:48:34 +0000 Subject: [PATCH] If it's a 0 level user direct to profile page instead of post page. git-svn-id: http://svn.automattic.com/wordpress/trunk@820 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-login.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wp-login.php b/wp-login.php index 695d63dd92..d19af3eb46 100644 --- a/wp-login.php +++ b/wp-login.php @@ -63,6 +63,12 @@ case 'login': $pwd = $HTTP_POST_VARS["pwd"]; $redirect_to = $HTTP_POST_VARS["redirect_to"]; } + + $user = get_userdatabylogin($log); + + if (0 == $user->user_level) { + $redirect_to = $site . '/wp-admin/profile.php'; + } function login() { global $wpdb, $log, $pwd, $error, $user_ID;