Preloading user preferences into glide_user

Francis Twyman
Tera Contributor

Hi, I wonder if anyone has run into this issue?
I'm trying to preload user preferences so they are available for client scripts without having to call:

getPreference('pref_name');

If you run this function from browser dev tools (F12), you get the following message appear in the console:

"Preference pref_name not found in the active user cache. Making a blocking AJAX call to load it. Consider pre-loading this property in glide_user."

I cannot find any documentation on how you can preload a user preference, I'd like to avoid making synchronous ajax calls if possible.

Can anyone shed any light?

Many thanks

1 ACCEPTED SOLUTION

So the goal is to redirect them to a survey if they haven't taken one yet? Is this a one time thing or will it happen based on multiple surveys?

I think instead of trying to run something on every page you could just add a login rule or modify an installation exit to redirect them to the survey on login if they need to take it.

View solution in original post

5 REPLIES 5

So the goal is to redirect them to a survey if they haven't taken one yet? Is this a one time thing or will it happen based on multiple surveys?

I think instead of trying to run something on every page you could just add a login rule or modify an installation exit to redirect them to the survey on login if they need to take it.