2011-04-09

Private Dabr

function config_log_request() {
// This function is called from menu.php if it exists

// Ignore people that aren't logged in
if (!user_is_authenticated()) return;
// Create a *lowercase* list of allowed users
$allowed_users = array(
'sogook',
);

// Check if the current user is in our allowed user list
if (!in_array(strtolower(user_current_username()), $allowed_users)) {
// They're not, kick them out!
user_logout();
die("Sorry, you're not on the list of allowed users.");
}
}

/config.php 加入以上代码 $allowed_users 下为授权用户ID/一行一个
/另一段隐藏链接 referer 的 meta 跳转代码 => 看过去

tags