sc_set_theme([glo_var]) does not work

  1. Added field to sec_users table to store name of theme that the user likes
  2. Added code in sec_login to get the value of that field (and echo reveals that it has been retrieved)
  3. sc_set_theme([glo_var]) does not work. Nothing works except text …sc_set_them(“themeName”)

I’ve tried a global variable, field on the login page, local variable … nothing works. Has anyone been able to make this work?

This works … it seems to be case sensitive … the theme ‘midnight’ and ‘Midnight’ are not interpreted the same … and it does not like global variables

$check_sql = “SELECT css_theme”
. " FROM sec_users_preferences"
. " WHERE login = ‘betty’";
sc_lookup(rs, $check_sql);

if (isset({rs[0][0]})) // Row found
{
$loc_css_theme = {rs[0][0]};
}
else // No row found
{
$loc_css_theme = ‘’;
}

echo $loc_css_theme ;
sc_set_theme(’$loc_css_theme’) ;

No. Still missing something.

Moved it out of sec_login to app_menu - works

I can confirm, sc_set_theme does not like [global_var]
with $local_var it works!