summaryrefslogtreecommitdiff
path: root/sql/functions/auth.get_all_inactive_users.sql
diff options
context:
space:
mode:
authorckonstanski <kostcarl@isu.edu>2026-07-18 21:18:18 -0600
committerckonstanski <kostcarl@isu.edu>2026-07-18 21:18:18 -0600
commit08e435104c42751689553537b1f20ffb14b8dfcc (patch)
treef83d8db1a02d4be448ab044d28fda7411470bd7c /sql/functions/auth.get_all_inactive_users.sql
initial commit
Diffstat (limited to 'sql/functions/auth.get_all_inactive_users.sql')
-rw-r--r--sql/functions/auth.get_all_inactive_users.sql24
1 files changed, 24 insertions, 0 deletions
diff --git a/sql/functions/auth.get_all_inactive_users.sql b/sql/functions/auth.get_all_inactive_users.sql
new file mode 100644
index 0000000..eee0ab9
--- /dev/null
+++ b/sql/functions/auth.get_all_inactive_users.sql
@@ -0,0 +1,24 @@
+drop function auth.get_all_users ();
+
+create or replace function auth.get_all_users ()
+returns setof auth.users
+as $$
+begin
+ return query
+ select u.id,
+ u.username,
+ u.pwd,
+ u.first_name,
+ u.last_name,
+ u.email,
+ u.phone,
+ u.active,
+ u.created
+ from auth.users u
+ order by u.last_name asc,
+ u.first_name asc,
+ u.id asc;
+
+ return;
+end;
+$$ language plpgsql;