multiple users redirected to same url | Peter's Login Redirect | Forum
Back to the login redirect plugin page
Topic RSS
multiple users redirected to same url
May 30, 2013
9:10 am
9:10 am
kasper
New Member
Forum Posts: 2
Offline
I figured it out. I changed this:
case 'username':
$variable_value = rawurlencode( $user->user_login );
$variable_value = rawurlencode( $user->user_login );
to this:
case 'username':
$variable_value = rawurlencode( $user->user_login );
if(strpos($variable_value, '_') !== false)
{
$pieces = explode("_", $variable_value);
$variable_value = $pieces[0]; // piece1
}
$variable_value = rawurlencode( $user->user_login );
if(strpos($variable_value, '_') !== false)
{
$pieces = explode("_", $variable_value);
$variable_value = $pieces[0]; // piece1
}
I tested it with a new username: test_username1 and it does redirect to the directory /test.
let me know if this is safe or if this could alter or break something.
thanks!