diff --git a/rackspace/db/v1/users/delegate.go b/rackspace/db/v1/users/delegate.go
index 0bb4c8c..8298c46 100644
--- a/rackspace/db/v1/users/delegate.go
+++ b/rackspace/db/v1/users/delegate.go
@@ -3,7 +3,6 @@
 import (
 	"github.com/rackspace/gophercloud"
 	os "github.com/rackspace/gophercloud/openstack/db/v1/users"
-	"github.com/rackspace/gophercloud/pagination"
 )
 
 // Create will create a new database user for the specified database instance.
@@ -11,11 +10,6 @@
 	return os.Create(client, instanceID, opts)
 }
 
-// List will list all available users for a specified database instance.
-func List(client *gophercloud.ServiceClient, instanceID string) pagination.Pager {
-	return os.List(client, instanceID)
-}
-
 // Delete will permanently remove a user from a specified database instance.
 func Delete(client *gophercloud.ServiceClient, instanceID, userName string) os.DeleteResult {
 	return os.Delete(client, instanceID, userName)
diff --git a/rackspace/db/v1/users/delegate_test.go b/rackspace/db/v1/users/delegate_test.go
index c818fe1..7a1b773 100644
--- a/rackspace/db/v1/users/delegate_test.go
+++ b/rackspace/db/v1/users/delegate_test.go
@@ -5,7 +5,6 @@
 
 	db "github.com/rackspace/gophercloud/openstack/db/v1/databases"
 	os "github.com/rackspace/gophercloud/openstack/db/v1/users"
-	"github.com/rackspace/gophercloud/pagination"
 	th "github.com/rackspace/gophercloud/testhelper"
 	fake "github.com/rackspace/gophercloud/testhelper/client"
 )
@@ -39,45 +38,6 @@
 	th.AssertNoErr(t, res.Err)
 }
 
-func TestUserList(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	os.HandleList(t)
-
-	expectedUsers := []os.User{
-		os.User{
-			Databases: []db.Database{
-				db.Database{Name: "databaseA"},
-			},
-			Name: "dbuser3",
-		},
-		os.User{
-			Databases: []db.Database{
-				db.Database{Name: "databaseB"},
-				db.Database{Name: "databaseC"},
-			},
-			Name: "dbuser4",
-		},
-	}
-
-	pages := 0
-	err := List(fake.ServiceClient(), instanceID).EachPage(func(page pagination.Page) (bool, error) {
-		pages++
-
-		actual, err := os.ExtractUsers(page)
-		if err != nil {
-			return false, err
-		}
-
-		th.CheckDeepEquals(t, expectedUsers, actual)
-
-		return true, nil
-	})
-
-	th.AssertNoErr(t, err)
-	th.AssertEquals(t, 1, pages)
-}
-
 func TestDelete(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
diff --git a/rackspace/db/v1/users/fixtures.go b/rackspace/db/v1/users/fixtures.go
index 5388123..5314e85 100644
--- a/rackspace/db/v1/users/fixtures.go
+++ b/rackspace/db/v1/users/fixtures.go
@@ -43,6 +43,34 @@
 }
 `
 
+var listResp = `
+{
+"users": [
+  {
+    "name": "dbuser1",
+    "host": "localhost",
+    "databases": [
+      {
+        "name": "databaseA"
+      }
+    ]
+  },
+  {
+    "name": "dbuser2",
+    "host": "localhost",
+    "databases": [
+      {
+        "name": "databaseB"
+      },
+      {
+        "name": "databaseC"
+      }
+    ]
+  }
+]
+}
+`
+
 var (
 	listUserAccessResp = singleDB
 	grantUserAccessReq = singleDB
diff --git a/rackspace/db/v1/users/requests.go b/rackspace/db/v1/users/requests.go
index 5667452..aab7e41 100644
--- a/rackspace/db/v1/users/requests.go
+++ b/rackspace/db/v1/users/requests.go
@@ -9,6 +9,15 @@
 	"github.com/rackspace/gophercloud/pagination"
 )
 
+// List will list all available users for a specified database instance.
+func List(client *gophercloud.ServiceClient, instanceID string) pagination.Pager {
+	createPageFn := func(r pagination.PageResult) pagination.Page {
+		return UserPage{pagination.LinkedPageBase{PageResult: r}}
+	}
+
+	return pagination.NewPager(client, baseURL(client, instanceID), createPageFn)
+}
+
 /*
 ChangePassword changes the password for one or more users. For example, to
 change the respective passwords for two users:
diff --git a/rackspace/db/v1/users/requests_test.go b/rackspace/db/v1/users/requests_test.go
index 655d229..2f2dca7 100644
--- a/rackspace/db/v1/users/requests_test.go
+++ b/rackspace/db/v1/users/requests_test.go
@@ -94,6 +94,48 @@
 	th.AssertEquals(t, 1, pages)
 }
 
+func TestUserList(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	fixture.SetupHandler(t, "/instances/"+instanceID+"/users", "GET", "", listResp, 200)
+
+	expectedUsers := []User{
+		User{
+			Databases: []db.Database{
+				db.Database{Name: "databaseA"},
+			},
+			Name: "dbuser1",
+			Host: "localhost",
+		},
+		User{
+			Databases: []db.Database{
+				db.Database{Name: "databaseB"},
+				db.Database{Name: "databaseC"},
+			},
+			Name: "dbuser2",
+			Host: "localhost",
+		},
+	}
+
+	pages := 0
+	err := List(fake.ServiceClient(), instanceID).EachPage(func(page pagination.Page) (bool, error) {
+		pages++
+
+		actual, err := ExtractUsers(page)
+		if err != nil {
+			return false, err
+		}
+
+		th.CheckDeepEquals(t, expectedUsers, actual)
+
+		return true, nil
+	})
+
+	th.AssertNoErr(t, err)
+	th.AssertEquals(t, 1, pages)
+}
+
 func TestGrantAccess(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
diff --git a/rackspace/db/v1/users/results.go b/rackspace/db/v1/users/results.go
index 3d4acb4..85b3a7a 100644
--- a/rackspace/db/v1/users/results.go
+++ b/rackspace/db/v1/users/results.go
@@ -95,6 +95,49 @@
 	return response.DBs, err
 }
 
+// UserPage represents a single page of a paginated user collection.
+type UserPage struct {
+	pagination.LinkedPageBase
+}
+
+// IsEmpty checks to see whether the collection is empty.
+func (page UserPage) IsEmpty() (bool, error) {
+	users, err := ExtractUsers(page)
+	if err != nil {
+		return true, err
+	}
+	return len(users) == 0, nil
+}
+
+// NextPageURL will retrieve the next page URL.
+func (page UserPage) NextPageURL() (string, error) {
+	type resp struct {
+		Links []gophercloud.Link `mapstructure:"users_links"`
+	}
+
+	var r resp
+	err := mapstructure.Decode(page.Body, &r)
+	if err != nil {
+		return "", err
+	}
+
+	return gophercloud.ExtractNextURL(r.Links)
+}
+
+// ExtractUsers will convert a generic pagination struct into a more
+// relevant slice of User structs.
+func ExtractUsers(page pagination.Page) ([]User, error) {
+	casted := page.(UserPage).Body
+
+	var response struct {
+		Users []User `mapstructure:"users"`
+	}
+
+	err := mapstructure.Decode(casted, &response)
+
+	return response.Users, err
+}
+
 // GrantAccessResult represents the result of granting access to a user.
 type GrantAccessResult struct {
 	gophercloud.ErrResult
