summaryrefslogtreecommitdiff
path: root/sql/functions/auth.get_all_inactive_users.sql
blob: eee0ab96bb71de32e95e18e5c374aca1dfc1fab9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;