I have different different role byes user , role1, role2 ,role 3, as it is , i want to set the role1 home page link siteurl/username/userid
for the frontpage ,in module configuration page ,role by ,redirection mode .if i use tokken on $user->uid they all take as a string. but i want
to set the redirection mode path the Ex- siteurl/username/userid(www.example.com/username/2) as .but user id it not take as a value , its display in url as string. so please help me to resolve this issues.

Comments

gautam kumar’s picture

Status: Active » Closed (fixed)

I got the solution of this issues.

roles byes front page redirection select the themes mode and paste this code

global $user;
$redirect = "/user/". $user-uid;
drupal_goto ($redirect);