Koozali.org: home of the SME Server

Creating custom templates for certain users??

Offline steve288

  • *
  • 336
  • +0/-0
Creating custom templates for certain users??
« on: October 16, 2009, 03:58:15 PM »
I understand how to make some small changes to templates that change global settings, say for cron, and I have read the development faq,  but I dont know how to make templates that might create or change settings for just one user. Say I want to make changes to a file in
/home/e-smith/files/users/tester/.procmailrc  or other files that get updated to with a template for one specific user. In other words tester's templates are one thing but all others are something else. This is primarily because in testing I may set up varous settings but when I rebuild the templates they get lost back to the default.

Regards

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Creating custom templates for certain users??
« Reply #1 on: October 16, 2009, 04:09:38 PM »
Say I want to make changes to a file in
/home/e-smith/files/users/tester/.procmailrc  or other files that get updated to with a template for one specific user. In other words tester's templates are one thing but all others are something else. This is primarily because in testing I may set up varous settings but when I rebuild the templates they get lost back to the default.
You will need to create templates in the template-user-custom tree and filter for the proper users using your own logic. You should be able to use the $USERNAME parameter for that as that should hold the user name for which user the template is expanded.

After making changes you should do the following for affected users:
Code: [Select]
signal-event user-modify usernameor for everyone at once:
Code: [Select]
signal-event user-modify
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline steve288

  • *
  • 336
  • +0/-0
Re: Creating custom templates for certain users??
« Reply #2 on: October 16, 2009, 04:36:55 PM »
Great thanks for the help.

Regards

Offline Curly

  • ****
  • 114
  • +0/-0
Re: Creating custom templates for certain users??
« Reply #3 on: October 18, 2009, 09:45:15 PM »
.......................................