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=newscreen
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=new'screen'); }
It redirect to http://www.domain.com/author/?screen=newscreen
without the username. can anyone help me with this