Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jeremy Groot
/
stellervista-Intranet
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
bc34428d
authored
2024-01-11 13:29:17 -0500
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
redirect fix
Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent
6d50656e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
wp-content/themes/understrap-child/functions.php
wp-content/themes/understrap-child/functions.php
View file @
bc34428
...
...
@@ -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
...
...
Please
register
or
sign in
to post a comment