- fix user_exists statement with host_all to use only username parameter
This commit is contained in:
parent
22648e88cd
commit
f2f0f83ee6
1 changed files with 1 additions and 1 deletions
|
@ -235,7 +235,7 @@ def connect(module, login_user=None, login_password=None, config_file=''):
|
|||
|
||||
def user_exists(cursor, user, host, host_all):
|
||||
if host_all:
|
||||
cursor.execute("SELECT count(*) FROM user WHERE user = %s AND host = %s", (user,host))
|
||||
cursor.execute("SELECT count(*) FROM user WHERE user = %s", user)
|
||||
else:
|
||||
cursor.execute("SELECT count(*) FROM user WHERE user = %s AND host = %s", (user,host))
|
||||
|
||||
|
|
Loading…
Reference in a new issue