I would like to have a user's name as a part of a URL, e.g. mysite.com/username. This should redirect to the user profile. I use Profile 2 and Pathauto, but I am not sure how to do this.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
With pathauto, you just have to configure user paths with a user token, e.g. [user:name]
.
回答2:
Pathauto pattern of [user:name]
under User paths should do the trick.