为wp1.5 的Stattraq增加登陆认证

Posted on 2005-03-22 21:56  freshventure  阅读(391)  评论(0编辑  收藏  举报

把wp 1.2中的auth.php 改为如下:

<?php
require_once(ABSPATH . '/wp-config.php');
global $user_level;
get_currentuserinfo();

if (10 != $user_level)
{
 header('Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
 exit();
}

?>
好像还是蛮简单,虽然到目前为止连php的基本语法都不熟悉,已经开始Hack wordpress了:)

不知道这是WordPress强,还是我强^_^