mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
is_user_logged_in()
git-svn-id: https://develop.svn.wordpress.org/trunk@3309 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -152,6 +152,16 @@ function wp_login($username, $password, $already_md5 = false) {
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( !function_exists('is_user_logged_in') ) :
|
||||
function is_user_logged_in() {
|
||||
global $current_user;
|
||||
|
||||
if ( $current_user->id == 0 )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( !function_exists('auth_redirect') ) :
|
||||
function auth_redirect() {
|
||||
// Checks if a user is logged in, if not redirects them to the login page
|
||||
|
||||
Reference in New Issue
Block a user