diff --git a/src/manage_sql.c b/src/manage_sql.c index 1598be76c..e576e5832 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -53682,7 +53682,7 @@ create_user (const gchar * name, const gchar * password, const gchar *comment, if (allowed_methods && (allowed_methods->len > 2)) return -3; - if (allowed_methods && (allowed_methods->len == 0)) + if (allowed_methods && (allowed_methods->len <= 1)) allowed_methods = NULL; if (allowed_methods @@ -54745,12 +54745,11 @@ modify_user (const gchar * user_id, gchar **name, const gchar *new_name, if (allowed_methods && (allowed_methods->len > 2)) return -3; - if (allowed_methods && (allowed_methods->len == 0)) + if (allowed_methods && (allowed_methods->len <= 1)) allowed_methods = NULL; if (allowed_methods - && ((g_ptr_array_index (allowed_methods, 0) == NULL) - || (strlen (g_ptr_array_index (allowed_methods, 0)) == 0))) + && (strlen (g_ptr_array_index (allowed_methods, 0)) == 0)) allowed_methods = NULL; if (allowed_methods