bc34428d by Jeff Balicki

redirect fix

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 6d50656e
......@@ -318,15 +318,14 @@ add_action( 'profile_update', function ( $user_id, $old_user_data ) {
function custom_redirects() {
$user = wp_get_current_user();
$updated_profile = get_user_meta( $user->ID, 'updated_profile', true );
if(!$updated_profile){
if (!is_page('account') ) {
wp_redirect( home_url( '/account/profile/' ) );
die;
function custom_redirects() {
if (!is_page('account') && is_user_logged_in() && !is_admin()) {
$user = wp_get_current_user();
$updated_profile = get_user_meta( $user->ID, 'updated_profile', true );
if(!$updated_profile){
wp_redirect( home_url( '/account/profile/' ) );
die;
}
}
}
}
//add_action( 'template_redirect', 'custom_redirects' );
\ No newline at end of file
add_action( 'template_redirect', 'custom_redirects' );
\ No newline at end of file
......