mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Added action to register xmpp account.
This commit is contained in:
1 parent
d0157e09ab
commit
2fd1d6e7b2
2 files changed
+6
-3
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user