I'm using "Passwordless Login with OTP / SMS & Email - Facebook Account Kit" for login.
I want to redirect user to http://www.domain.com/author/<username>/screen
after they log in
this is the code I used
$current_user = wp_get_current_user();
if ( is_user_logged_in() ) {
$redirect = ('http://www.domain.com/author/'.$current_user->user_login.'/screen'); }
It redirect to http://www.domain.com/author/screen
without the username. can anyone help me with this