241 |
241 |
242 if not hosts[host] then |
242 if not hosts[host] then |
243 show_warning("The host '%s' is not listed in the configuration file (or is not enabled).", host) |
243 show_warning("The host '%s' is not listed in the configuration file (or is not enabled).", host) |
244 show_warning("The user will not be able to log in until this is changed."); |
244 show_warning("The user will not be able to log in until this is changed."); |
245 hosts[host] = make_host(host); |
245 hosts[host] = make_host(host); |
246 elseif config.get(host, "core", "authentication") |
|
247 and config.get(host, "core", "authentication") ~= "default" then |
|
248 show_warning("The host '%s' is configured to use the '%s' authentication provider", host, |
|
249 config.get(host, "core", "authentication")); |
|
250 show_warning("prosodyctl currently only supports the default provider, sorry :("); |
|
251 return 1; |
|
252 end |
246 end |
253 |
247 |
254 if prosodyctl.user_exists{ user = user, host = host } then |
248 if prosodyctl.user_exists{ user = user, host = host } then |
255 show_message [[That user already exists]]; |
249 show_message [[That user already exists]]; |
256 return 1; |
250 return 1; |
286 |
280 |
287 if not hosts[host] then |
281 if not hosts[host] then |
288 show_warning("The host '%s' is not listed in the configuration file (or is not enabled).", host) |
282 show_warning("The host '%s' is not listed in the configuration file (or is not enabled).", host) |
289 show_warning("The user will not be able to log in until this is changed."); |
283 show_warning("The user will not be able to log in until this is changed."); |
290 hosts[host] = make_host(host); |
284 hosts[host] = make_host(host); |
291 elseif config.get(host, "core", "authentication") |
|
292 and config.get(host, "core", "authentication") ~= "default" then |
|
293 show_warning("The host '%s' is configured to use the '%s' authentication provider", host, |
|
294 config.get(host, "core", "authentication")); |
|
295 show_warning("prosodyctl currently only supports the default provider, sorry :("); |
|
296 return 1; |
|
297 end |
285 end |
298 |
286 |
299 if not prosodyctl.user_exists { user = user, host = host } then |
287 if not prosodyctl.user_exists { user = user, host = host } then |
300 show_message [[That user does not exist, use prosodyctl adduser to create a new user]] |
288 show_message [[That user does not exist, use prosodyctl adduser to create a new user]] |
301 return 1; |
289 return 1; |
331 |
319 |
332 if not hosts[host] then |
320 if not hosts[host] then |
333 show_warning("The host '%s' is not listed in the configuration file (or is not enabled).", host) |
321 show_warning("The host '%s' is not listed in the configuration file (or is not enabled).", host) |
334 show_warning("The user will not be able to log in until this is changed."); |
322 show_warning("The user will not be able to log in until this is changed."); |
335 hosts[host] = make_host(host); |
323 hosts[host] = make_host(host); |
336 elseif config.get(host, "core", "authentication") |
|
337 and config.get(host, "core", "authentication") ~= "default" then |
|
338 show_warning("The host '%s' is configured to use the '%s' authentication provider", host, |
|
339 config.get(host, "core", "authentication")); |
|
340 show_warning("prosodyctl currently only supports the default provider, sorry :("); |
|
341 return 1; |
|
342 end |
324 end |
343 |
325 |
344 if not prosodyctl.user_exists { user = user, host = host } then |
326 if not prosodyctl.user_exists { user = user, host = host } then |
345 show_message [[That user does not exist on this server]] |
327 show_message [[That user does not exist on this server]] |
346 return 1; |
328 return 1; |