Jump to content
Geoffrey Smith

RAD Server change password for user

Recommended Posts

I want to be able to change a RAD Server users password programmatically, without using the RAD Server console.  Does someone have an example of how to do this.  My searching through documentation and the internet has been fruitless.

 

Thanks

 

Geoffrey

Share this post


Link to post

I was just browsing through this forum and noticed that no one ever answered your question--at least not here.

 

Have you tried looking at the source to RSConsole? It's a FireMonkey app in the source\data\ems\rsconsole folder.

Share this post


Link to post

For anyone who is looking for this in the future....

 

From https://docwiki.embarcadero.com/RADStudio/Sydney/en/Tutorial:_RAD_Server_Client_Application_to_Manage_RAD_Server_Users#Updating_the_RAD_Server_User_Password_Stored_in_the_RAD_Server_Engine

 

where

ListView1.Selected.Detail = _id of the user you want to update
procedure TForm1.UpdatePasswordClick(Sender: TObject);
var
  LEditedUser: TJSONObject;
  LUpdatedAt: TBackendEntityValue;
begin

  try
   if ListView1.Selected <> nil then
   begin
     LEditedUser := TJSONObject.Create;
     LEditedUser.AddPair('password',editedPassword.Text);
     BackendUsers1.Users.UpdateUser(TListViewItem(ListView1.Selected).Detail,LEditedUser,LUpdatedAt);
     editedPassword.Text:='';
   end;
  finally
    LEditedUser.Free;
  end;
end;

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×