Log In    |    Knowledge Base    |    4D Home
Tech Tip: Changing the Current User
Published On: October 21, 2004
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

In 4D 2004, you can change the current user of the database using the CHANGE CURRENT USER command. In the previous version of 4D, this command used to be called CHANGE ACCESS and has been renamed in 4D 2004. When you’re upgrading your database to 4D 2004 from previous version that has the command CHANGE ACCESS, it will automatically be changed to CHANGE CURRENT USER. Just like before, the CHANGE CURRENT USER command will load up the 4D password system to change to a different current user if no parameter is passed. In 4D 2004, you can now pass optional parameters to this command so you can programmatically change the current user of the database. The parameters are the username or unique user ID and password. For instance the code below will change the current user to “TestUser1” whose password is “test”:

CHANGE CURRENT USER(“TestUser1”;”test”)