diff --git a/erpnext/utilities/page/users/users.js b/erpnext/utilities/page/users/users.js
index 704682eafc..28fbc1b0f4 100644
--- a/erpnext/utilities/page/users/users.js
+++ b/erpnext/utilities/page/users/users.js
@@ -223,7 +223,7 @@ $.extend(wn.pages.users, {
add_user: function() {
var me = wn.pages.users;
var active_users = $('.user-card:not(.disabled)');
- if(wn.boot.max_users && (active_users.length >= wn.boot.max_users)) {
+ if(wn.boot.max_users && (active_users.length >= wn.boot.max_users) && wn.boot.max_users) {
msgprint(repl("Alas!
\
You already have %(active_users)s active users, \
which is the maximum number that you are currently allowed to add.
\
diff --git a/erpnext/utilities/page/users/users.py b/erpnext/utilities/page/users/users.py
index 819f7bb1da..2b7c884821 100644
--- a/erpnext/utilities/page/users/users.py
+++ b/erpnext/utilities/page/users/users.py
@@ -112,7 +112,7 @@ def add_profile(args):
active_users = sql("""select count(*) from tabProfile
where ifnull(enabled, 0)=1 and docstatus<2
and name not in ('Administrator', 'Guest')""")[0][0]
- if active_users >= conf.max_users:
+ if active_users >= conf.max_users and not conf.max_users:
# same message as in users.js
webnotes.msgprint("""Alas!
\
You already have %(active_users)s active users, \