| 1 | local usermanager = require "core.usermanager" |
| 2 | local jid = require "util.jid" |
| 3 | local username, host = jid.split(module:get_option_array("admins")[1]) |
| 4 | |
| 5 | module:hook_global("server-started", function() |
| 6 | if not usermanager.user_exists(username, host) then |
| 7 | assert(usermanager.create_user(username, module:get_option_string("bootstrap_password"), host)) |
| 8 | end |
| 9 | end) |