mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-15 09:51:21 +00:00
Added action to register xmpp account.
This commit is contained in:
parent
d0157e09ab
commit
2fd1d6e7b2
2
actions/xmpp-register
Executable file
2
actions/xmpp-register
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
ejabberdctl register $1 `hostname` $2
|
||||
@ -4,6 +4,7 @@ from modules.auth import require
|
||||
from plugin_mount import PagePlugin, FormPlugin
|
||||
import cfg
|
||||
from forms import Form
|
||||
from privilegedactions import privilegedaction_run
|
||||
from util import Message
|
||||
|
||||
class xmpp(PagePlugin):
|
||||
@ -44,10 +45,10 @@ class register(FormPlugin, PagePlugin):
|
||||
if not username: msg.add = _("Must specify a username!")
|
||||
if not password: msg.add = _("Must specify a password!")
|
||||
|
||||
# register account using script
|
||||
|
||||
if not msg:
|
||||
if username and password:
|
||||
privilegedaction_run("xmpp-register", [username, password])
|
||||
msg.add = _("Registered account for %s." % username)
|
||||
|
||||
cfg.log(msg.text)
|
||||
main = self.main(username, msg=msg.text)
|
||||
return self.fill_template(title="XMPP Server Configuration", main=main, sidebar_left=self.sidebar_left, sidebar_right=self.sidebar_right)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user