Okay, so i have drupal (4.6.3) up and running and pretty much to my liking. However, one feature that I either am too blind to figure out or one that is not available is the ability to give users aliases. I use LDAP authentication for my users so my users are stuck with their usernames. However, it would be nice for our users to have there names under their blogs show up as "John A Smith" instead of "jasmith".

I know some CMS's include the feature to be able to add a nickname/alias/display name that differs from their account name.

It seems like a fairly trivial change to add an extra field to SQL and modify the php to include this field in the user's accounts. Am I missing something or is this really not a core feature in Drupal? I really don't want to hack any more of the code up to make this work...

Thanks,

Drizzle

Comments

jeepfreak’s picture

Well, you wouldn't have to add a SQL field... it should already be in the 'User' table and accessable through the global variable $user... but as far as I know, you would have to change some code to print it where you want it. Maybe a more experienced user will chime in.
Good luck,
Billy

drizzle-1’s picture

Maybe I am missing something. I am running 4.6.3. Below are the fields in my User table:
uid, name, pass, mail, mode, sort, threshold, theme, signature, created, changed, status, timezone, language, picture, init, data

I don't see where there is a field specifically for an Alias/Nick. The name field is for the actual authenticated user. If I change that, then the next time one of my users tries to log in, another username is created. Say I change "jasmith" to "John A Smith". The next time "jasmith" tries logging in, another user is created as "jasmith" and now I have two users "jasmith" and "John A Smith" (not to mention a bunch of PHP & MySQL errors due to duplications in the dB).

If there is a field that I am missing in SQL, then I just need to know what its name is so I can add it. I have tried looking through the docs to find the default user fields but haven't stumbled upon what I am looking for.

Thanks!

jeepfreak’s picture

Man, I'm sorry... you're totally right. I added the "Real Name" filed myself through admin/settings/profile. You'd have to do that too and then pull the value from the profile_values table. You'll have to lookup the value based on UID, but grab the value from whatever field number your "Real Name" field gets assigned.
Billy

styro’s picture

Lets you add other user related fields - no SQL hacking required.

You'd have to update templates etc to print the extra info where you wanted it though.

--
Anton

drizzle-1’s picture

I'll take a look at the profile mod when I get in to work in the morning. From your posts though, I am already sure it will work.

Thanks for the advice!

Drizzle