KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Differences between CHANGE CURRENT USER and SET USER ALIAS
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: January 13, 2025

To be able to switch the currently logged in user programmatically in 4D, one would use CHANGE CURRENT USER. This is useful in the case where you would want to switch from the Designer acccount to a regular remote client account, or if you are trying to switch accounts that have access to different permissions, such as 4D Write Pro. This is also useful for making custom dialog boxes, instead of using the default 4D one. However, please note that if the group of the current user has access to serialized features like plug-ins, the license will be assigned and be in use to the 4D user account until the end of the session, even if the command is called for a user who belongs to a group without access to the feature.

Meanwhile, SET USER ALIAS will only change the name of the currently logged in user for that session only. It does not change the actual user, but it will display a different name under the Users tab on the 4D Server Administration window. This command can also only be called from 4D Server. When a custom alias is defined for the current user with this command, it will be reset by a call to the CHANGE CURRENT USER command.