eZ Community » Forums » Developer » Using the user preferences system ?
expandshrink

Using the user preferences system ?

Using the user preferences system ?

Thursday 17 June 2010 2:29:12 pm - 3 replies

Hello,

How can we use the "/user/preferences/set/" system ?

Can we pass arrays with this system ? What are the related php functions in ezpublish api to retrieve a user preferences ?

Thank !

Friday 18 June 2010 4:12:12 am

Hi Martin

Have you seen these?

The following methods can be used to retrieve user preferences

Cheers
Bruce

Modified on Friday 18 June 2010 4:12:49 am by Bruce Morrison

Friday 18 June 2010 10:58:35 am

The value can not be an array, it must be a string, but you can of course use a string to represent an array as long as it is legal to put into an url.

Alternatively it also supports values by post, if you want to post value as json or some other format. But I suspect that was added in 4.3 together with 'set_and_exit' which is to be able to use it in ajax calls without regenerating a full page in the background.

Note: value & name has a limit of 100 chars each, I suspect this is because preferences are cached to session, and thus can't be of unlimited size.

Friday 18 June 2010 1:35:30 pm

Thanks for your answers, i got it now.

It seems that variables stored with this system are recorded in session too.

I didn't knew there were an API documentation website...will be very useful for me.

Modified on Friday 18 June 2010 1:37:19 pm by H-Works Agency

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from