So, I accidentally deleted my Admin account in the server database and now i can't login.

is there anybody who can tell me what to do and how i can create a new admin without login in in the http://<environment address>/Users ??

You mean the DB admin?

Because if you mean the OS admin, I expect that to be protected by all the external references. If it is gone with cascade delete, the only way of getting it back without editing tables is with a backup.


(and that's why you don't get BD access by default in cloud environments).

Nuno Reis wrote:

You mean the DB admin?

Because if you mean the OS admin, I expect that to be protected by all the external references. If it is gone with cascade delete, the only way of getting it back without editing tables is with a backup.


(and that's why you don't get BD access by default in cloud environments).

I'm all new to this, so I don't have a backup of the environment user DB so is it really impossible to make a new admin account? 

Or do I have to start all over again and create a new environment?


Hi Kasper,

You can create one user programmatically and add the role user manager. To do this you have the entity user and user_role on system. Create the user and don't forget to encrypt the password and save the userId than go to the role entity and check the roleid of the usermanager role. Use those 2 IDs to create a record on the user_role entity.

Regards,

Marcelo