ServiceNow Platform snippets and uses
gs.getUserID(); // sys_id of the user
gs.getUser(); // user record
getUserByID('abel.tuter'); //fetched a different user, using the user_name field or sys_id on the target user record.
gs.getUserName(); // User's Name sys_user.name
gs.getUserDisplayName(); // unsure of difference from above
//http://wiki.servicenow.com/index.php?title=GlideSystem#getUserID.28.29&gsc.tab=0
//http://wiki.servicenow.com/index.php?title=Getting_a_User_Object#gsc.tab=0
// useful for client scripts
g_user.userID;
g_user.userName;
g_user.firstName;
g_user.lastName;
//http://wiki.servicenow.com/index.php?title=GlideUser_(g_user)#gsc.tab=0
// conditions for things like notifications
// assigned_to is_not javascript: gs.getUserID()
javascript: gs.getUserID();