]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/common/davical_plugin.rb
Rename PostfixadminDb, RoundcubeDb without the Db suffix.
[mailshears.git] / lib / common / davical_plugin.rb
index cdde3d1e068301fbd13a3eb05783fed7f878d8bc..c8a67261c16c23cad6da901128cd281e7e384076 100644 (file)
@@ -19,7 +19,7 @@ module DavicalPlugin
 
   def describe_domain(domain)
     # DAViCal doesn't have a concept of domains.
-    return 'N/A'
+    return domain
   end
 
 
@@ -70,7 +70,7 @@ module DavicalPlugin
   end
 
 
-  def get_davical_usernames()
+  def list_users()
     usernames = []
 
     begin
@@ -82,7 +82,8 @@ module DavicalPlugin
                                   @db_user,
                                   @db_pass)
 
-      sql_query =  "SELECT username FROM usr"
+      # User #1 is the super-user, and not tied to an email address.
+      sql_query =  "SELECT username FROM usr WHERE user_no > 1"
 
       connection.query(sql_query) do |result|
         usernames = result.field_values('username')