mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Fixed admin level security problem.
Plus an user -> a user git-svn-id: https://develop.svn.wordpress.org/trunk@149 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -127,7 +127,7 @@ switch($action) {
|
||||
if ($user_level > 0) {
|
||||
$postdata = get_postdata($post);
|
||||
$authordata = get_userdata($postdata["Author_ID"]);
|
||||
if ($user_level < $authordata[13])
|
||||
if ($user_level < $authordata->user_level)
|
||||
die ('You don’t have the right to edit <strong>'.$authordata[1].'</strong>’s posts.');
|
||||
|
||||
$content = $postdata['Content'];
|
||||
@@ -218,7 +218,7 @@ switch($action) {
|
||||
$postdata=get_postdata($post) or die("Oops, no post with this ID. <a href=\"b2edit.php\">Go back</a> !");
|
||||
$authordata = get_userdata($postdata["Author_ID"]);
|
||||
|
||||
if ($user_level < $authordata[13])
|
||||
if ($user_level < $authordata->user_level)
|
||||
die ("You don't have the right to delete <b>".$authordata[1]."</b>'s posts.");
|
||||
|
||||
$query = "DELETE FROM $tableposts WHERE ID=$post";
|
||||
|
||||
Reference in New Issue
Block a user