Koozali.org: home of the SME Server

Custom Pseudonyms Creation

Offline GlitchFreak

  • ****
  • 97
  • +0/-0
Custom Pseudonyms Creation
« on: February 08, 2008, 10:58:51 AM »
Good day

Is it possible to create a custom set on pseudonyms on the fly when a user is created?

Also, is it possible to prevent the creation of name.surname & name_surname pseudonyms when a user is created?

Apologies if this has been answered previously. I did search but the variable names of posts is rather vast.

Thank you.

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Custom Pseudonyms Creation
« Reply #1 on: February 08, 2008, 03:42:01 PM »
You would need to customize /etc/e-smith/events/actions/update-user-pseudonyms.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Custom Pseudonyms Creation
« Reply #2 on: February 08, 2008, 03:48:00 PM »
You would need to customize /etc/e-smith/events/actions/update-user-pseudonyms.

Better would be to provide an additional script which does what is wanted. Any customisations to update-user-pseudonyms would be lost on the next update.

Offline GlitchFreak

  • ****
  • 97
  • +0/-0
Re: Custom Pseudonyms Creation
« Reply #3 on: February 09, 2008, 11:01:57 PM »
Thanks.

With regards to the additional script, how do I make certain it runs when I add a new user?

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Custom Pseudonyms Creation
« Reply #4 on: February 10, 2008, 12:27:42 AM »
Unfortunally the pseudonyms are created in the server-manager script. So you can either modify it with the risk to lose it on update or try this (untested!!) proposal:
Create a script /etc/e-smith/events/actions/custom-pseudonyms that removes the unwanted pseudonyms records and creates the customized pseudonyms records in the' accounts' database and finally runs the command "/sbin/e-smith/expand-template /var/qmail/users/assign"

Link this script to
/etc/e-smith/events/user-create/S01custom-pseudonyms
/etc/e-smith/events/user-modify/S01custom-pseudonyms
and
/etc/e-smith/events/user-delete/S01custom-pseudonyms