用户登录成功后跳转页面
// For authenticated user, go to news page after login
function goto_user_login(&$edit, $account) {
global $user;
// Check to see if $user has the administrator role.
if (in_array('authenticated user', array_values($user->roles))) {
if(count(array_values($user->roles)) == 1){
$edit['redirect'] = 'club-news';
}else{
$edit['redirect'] = 'user';
}
}
}