Infiniroot Blog: We sometimes write, too.

Of course we cannot always share details about our work with customers, but nevertheless it is nice to show our technical achievements and share some of our implemented solutions.

Invoice Ninja v5: How to make the Account Management setting available to additional (admin) users

Published on April 29th 2022


Invoice Ninja allows to create additional users to manage clients, invoices and other data depending on the given permissions.

Create new Invoice Ninja user

This is helpful, when your staff handles invoicing and billing but shouldn't really touch and change any of the system settings.

On the other hand you might also want to create a user with elevated privileges with all rights within Invoice Ninja, including the settings. This is possible by toggling the "Administrator" slider above the specific permissions.

Missing Account Management setting

However there is still one thing, the additional users with Administrator permissions can't do: Control system wide Invoice Ninja settings, such as handling the Whitelabel License or creating API keys (tokens).

These settings are controlled in Settings -> Account Management. But this option is not showing up for additional administrator users:

Missing Account Management settings in Invoice Ninja v5

The reason for this option being hidden is that it is only shown to the "owner" of that Invoice Ninja installation. The "owner" flag is automatically set to the first account created in that installation. All additional users do not get that flag. It is also nowhere possible in the application to manually add this flag to a user.

It's all in the database

Luckily there's a solution (there is always a solution!). If you have enough technical knowledge and know some SQL, you can adjust the "owner flag" directly in the database, used by the Invoice Ninja installation.

The setting in question is a simple on (1) or off (0) in the is_owner column in the company_users table:

MariaDB [invoiceninja5]> SELECT id,company_id,account_id,user_id,is_owner,is_admin FROM company_user;
+----+------------+------------+---------+----------+----------+
| id | company_id | account_id | user_id | is_owner | is_admin |
+----+------------+------------+---------+----------+----------+
|  3 |          2 |          1 |       1 |        1 |        1 |
|  4 |          2 |          1 |       2 |        0 |        1 |
+----+------------+------------+---------+----------+----------+
2 rows in set (0.000 sec)

From the SQL output we can see that user_id 1 is defined as owner (is_owner).

Note: To see which user this actually is, launch this SQL query: SELECT id,email FROM users WHERE id = 1;

To set the owner flag on the second user (user_id 2), use the following query:

MariaDB [invoiceninja5]> UPDATE company_user SET is_owner = 1 WHERE user_id = 2;
Query OK, 1 row affected (0.001 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Both users now have the flag is_owner set:

MariaDB [invoiceninja5]> select id,company_id,account_id,user_id,is_owner,is_admin from company_user;
+----+------------+------------+---------+----------+----------+
| id | company_id | account_id | user_id | is_owner | is_admin |
+----+------------+------------+---------+----------+----------+
|  3 |          2 |          1 |       1 |        1 |        1 |
|  4 |          2 |          1 |       2 |        1 |        1 |
+----+------------+------------+---------+----------+----------+
2 rows in set (0.000 sec)

Account Management settings for the second owner user

Right after this change in the database, the second user is now able to see the "Account Management" setting in the application:

Account Management settings in Invoice Ninja v5

Your own Invoice Ninja server - data hosted in Switzerland

Since July 2020 Infiniroot offers dedicated Invoice Ninja servers in Switzerland. This allows you to run your own billing application using InvoiceNinja in a secure server environment and data in Switzerland, even with a low budget!

Since April 2022 Infiniroot's Invoice Ninja servers now also support invoices with Swiss QR Bill payment slips; the new QR-code based payment slips which replace the red and orange payment slips in 2022.