Notifications
Clear all

How can I set a user to use Neo or CC as their UI_TYPE from the database?

1 Posts
1 Users
2 Reactions
1,224 Views
1
Topic starter

I want to change the UI type from Neo to CC (or vice versa), but I want to do it administratively through the DB, not through the user interface.  How can i do it?

1 Answer
1
Topic starter

The user's UI Type selection lives in the BLOB column USERS.PREF_PROP_LIST.

 

If this column is null, you can initialize it to Neo with the following:

update users set PREF_PROP_LIST = 
UTL_RAW.CAST_TO_RAW('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><UserPrefPropertyList xmlns="http://www.onenetwork.com/Platform"><UserPrefProperty PropertyType="UI_TYPE">Neo</UserPrefProperty></UserPrefPropertyList>')
where user_name = 'usernamegoeshere';

 

 

You can likewise switch from Neo to CC like this:

update users
set pref_prop_list = blob_replace(PREF_PROP_LIST, '<UserPrefProperty PropertyType="UI_TYPE">Neo</UserPrefProperty>', '<UserPrefProperty PropertyType="UI_TYPE">CC</UserPrefProperty>')
where user_name = 'usernamegoeshere';

 

and vice-versa, from CC to Neo like this:

 

update users
set pref_prop_list = blob_replace(PREF_PROP_LIST, '<UserPrefProperty PropertyType="UI_TYPE">CC</UserPrefProperty>', '<UserPrefProperty PropertyType="UI_TYPE">Neo</UserPrefProperty>')
where user_name = 'usernamegoeshere';

 

These queries only work if the user has a UI_TYPE entry to begin with.  If that prop is missing from the PRES_PROP_LIST, you may have to construct a new query to insert it into the existing BLOB.