Hi guys, I have a problem, i'm creating a community based on users profiles.
I have expanded the user profiles with content profiles and auto generating a path with pathauto (users/name-raw, ex: users/goldroger).

Now i have a problem, all the drupal modules (like friendlist) points to the standard path of the user account page, ex:user/goldroger

I've tryed to modify the codes of modules but without success

Now I have a question, it's possible change the user path into drupal core?

I want to add a button to my account (done) and all modules pointing to the new user profile.

I've tryed to change into drupal core but I don't have find it where to modify it.

Anyone can help me with some suggestion?

Thx at all.

Comments

dnewkerk’s picture

Never ever modify Drupal core or the files of modules (other than template files from core or modules which you can copy to your theme's own directory to override and customize them). If you modify core or modules themselves you will be in for a whooole lot of trouble for each of the many future security upgrades you will need to apply (and you "cannot" skip them, as your site will likely be hacked if you ignore the updates).

Personally I recommend you go with the Pathauto path of user/[user-raw] ... both because this is consistent with core's own "real" user path, and because it really makes more sense in my opinion (e.g. user/myname ... you're just showing 1 user, makes sense to have the path be "user" not plural users). This is always one of the first paths I change when I install Pathauto.

However, when it comes down to it the Pathauto path doesn't really actually matter at all when it comes to Views user arguments and such. Views by default looks at the "real" path that is underneath any path aliases. For users, no matter what alias you set, this is always user/uid (where uid is the user's #). For nodes the real path is always node/nid even if the alias is something/really/really/long.

Anyhow, hope this helps.

greggles’s picture

The reason Pathauto doesn't use "user/[user-raw]" as the pattern by default is because it can be somewhat dangerous. Sure, it's an uncommon problem, but you should know about the potential problems.

Regarding the original issue, if there is a module that generates a link to "user/username" when it should be "users/username" that is a bug in that module which should be fixed - file a specific issue for it in that module's queue.

dnewkerk’s picture

Hey Greg -

Hmm I knew about not putting user-generated Pathauto paths at Drupal's root, but wasn't aware of this about user vs. users. I looked and wasn't able to find the discussion where the user name transliteration issue came up - if you happen to know the URL, could you point me to it so I can get up to speed on what happened? (since from reading the example I'm not quite clear on what exactly happened or how to try to test it myself). Supposing I validated user registration to only allow basic A-Z and numbers in user names, would this fully alleviate this particular concern?

On the other side regarding conflicting with system paths, I tested making a few user names that would conflict with system paths such as user/register, and in those cases it simply didn't make the alias for the user, so the system path remained as normal (I could also just make a few rules ahead of time to pre-screen those paths from being accepted as user names). So it appears core and/or Pathauto is screening for those system paths already?

Thought about it a bit and figured I could switch to using profile/username for future sites instead... any dangers in that path?
Thanks :)

GolDRoger’s picture

I've tryed to modify to user/[user-row] instead of users/[user-row]

but for the profile it make me for example: user/goldroger-0

and I have the same problem friendlist point to user/goldroger instead of user/goldroger-0