Then I use the 'after_login' and 'before_logout' logic hooks to populate these 2 custom fields:Ĭontent of /custom/Extension/modules/Users/Ext/LogicHooks/usersLH_cstmfields_defintion.php:Ĭontent of /custom/modules/Users/usersLH_cstmfields_function. Essentially, via studio, I created 2 custom fields in the Users module - userlastlogin_c and userlastlogout_c. What I implemented comes from post #14 of this thread.
#SUITECRM LOGIC HOOKS CODE#
I re-looked at the code last evening, and I subsequently "brushed it off". I did suspect whether the issue has anything to do with that logic hooks. Q: Do you know if your CRM has any customizations around the Users table, or the Login/Logout functionality, that may cause issues? (Plugins / Logic Hooks / Workflows / etc)Ī: Yes, I implemented logic hooks. Q: Do you know if this issue occurs for specific users? (or user types, such as Administrators)Ī: It occurs for both administrators and normal users However, once the user re-logged in, the 'user_preference' record (with "category" column = global) associated with the user was once again altered, and the decoded "contents" column contains: s:14:"use_real_names" s:3:"off" If, instead of logging out from SuiteCRM in step 4, the user just closed the browser and cleared cache, the 'user_preference' record (with "category" column = global) associated with the user remained unchanged. The decoded "contents" column of the record (with "category" column = global) associated with the user contains: s:14:"use_real_names" s:3:"off" Immediately after step 4, I checked the 'user_preference' table again. The decoded "contents" column of the record (with "category" column = global) associated with the user contains: s:14:"use_real_names" s:2:"on" Immediately after step 2, I checked the 'user_preference' table.
#SUITECRM LOGIC HOOKS FULL#
The "Show Full Names" option has been turned off