mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Redirect to profile.php if user level == 0.
git-svn-id: https://develop.svn.wordpress.org/trunk@822 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+9
-2
@@ -1,6 +1,13 @@
|
||||
<?php
|
||||
|
||||
/* This will possibly be more later but for now let's just redirect. */
|
||||
require('../wp-config.php');
|
||||
|
||||
header ('Location: post.php');
|
||||
$user = get_userdatabylogin($log);
|
||||
|
||||
if (0 == $user->user_level) {
|
||||
$redirect_to = $site . '/wp-admin/profile.php';
|
||||
} else {
|
||||
$redirect_to = $site . '/wp-admin/post.php';
|
||||
}
|
||||
header ("Location: $redirect_to");
|
||||
?>
|
||||
Reference in New Issue
Block a user