From: Michael Tremer Date: Mon, 15 Oct 2018 11:32:45 +0000 (+0100) Subject: people: List all users X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51907e45fefc97505ab662598026cdb4d4a66cf4;p=ipfire.org.git people: List all users Signed-off-by: Michael Tremer --- diff --git a/src/backend/talk.py b/src/backend/talk.py index 7ebeb04d..ab07b436 100644 --- a/src/backend/talk.py +++ b/src/backend/talk.py @@ -246,25 +246,6 @@ class Talk(Object): # Connect to FreeSWITCH self.freeswitch = Freeswitch(self.backend) - @property - def accounts(self): - for account in self.backend.accounts: - if not account.is_talk_enabled(): - continue - - yield account - - def search(self, query): - accounts = [] - - for account in self.backend.accounts.search(query): - if not account.is_talk_enabled(): - continue - - accounts.append(account) - - return accounts - # Conferences @property diff --git a/src/web/people.py b/src/web/people.py index face462c..23339daa 100644 --- a/src/web/people.py +++ b/src/web/people.py @@ -75,7 +75,7 @@ class SearchHandler(base.BaseHandler): q = self.get_argument("q") # Perform the search - accounts = self.backend.talk.search(q) + accounts = self.backend.accounts.search(q) # Redirect when only one result was found if len(accounts) == 1: @@ -104,7 +104,7 @@ class UserHandler(base.BaseHandler): class AccountsListModule(ui_modules.UIModule): def render(self, accounts=None): if accounts is None: - accounts = self.backend.talk.accounts + accounts = self.backend.accounts return self.render_string("people/modules/accounts-list.html", accounts=accounts)