Skip to content

There are two ways to add a new administrator in the CMS, depending on whether you are creating the first user or adding additional ones.

After server reset (or first installation)

If you have recently reset your accounts table, remember to also reset the model_has_roles table in the site’s database. This table is responsible for assigning roles to accounts. If you forget to reset it, some accounts may retain roles they shouldn’t have.

To create the first administrator account, you need to use the website’s CLI. Open an SSH connection and navigate to the website’s root directory.

cd /home/<my website folder>

(the path indicated above might be different for you!)

After that run the command

make shell
php artisan lonvel:super-admin <account login>

where <account login> is the login of the user you want to make super administrator from your accounts table.

Using Role system

You can assign roles to other users and create new roles as needed.

To do this, log in to the website with an administrator account and navigate to the “Accounts” section.

Alt

Find the account you want to assign a role and click on “Edit”:

Alt

Then assign the roles you want and click on save.

Alt

The name of the admin role is super_admin.