Extending capabilities ...

cangrande - April 26, 2006 - 16:45

I've read lot of hooks, but i'm not shure top understand well.

The problem
I need to perfome some more task upon a special event ...
I want that when ... a user change language --> the system could update a series of information based on that parameter ...

for example ...

User "Alessandro" changes his profile "language" field from English to Italian ... i want an action (my php code) will be called ... with uid passed to him ... based on uid and language i'll fix some other things, like "set capital to Rome" .. set TimeZone to GMT+1 and other usefull things ...

how to automatically bind a call to the event of profile change?

many thanks in advance for you hints
alberto

up

cangrande - April 27, 2006 - 07:29

up

hook_user

Heine - April 27, 2006 - 08:15

You're probably looking for hook_user.

Next, some thoughts about

[...] based on uid and language i'll fix some other things, like "set capital to Rome" .. set TimeZone to GMT+1 and other usefull things ...

Now keep in mind that I don't know the demography of your visitors.

Suppose I visit your site from Capetown (SA) and register. Because you do not offer Afrikaans, nor English as a locale language I choose Dutch. What happens to capital & timezone? What happens if I can and do select English?

--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

 
 

Drupal is a registered trademark of Dries Buytaert.