Home › Forums › General Issues › Deny user login/redirect based on ACF values › Reply To: Deny user login/redirect based on ACF values
You are looking to use this hook https://developer.wordpress.org/reference/hooks/login_redirect/.
There are examples on that page.
The hook passes the user data, you use that to get the field from the user and redirect based on the field value
$value = get_field('field_name', $user);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.