blob: 7f635a0b174ca3584fb034040d89041f34daef9b (
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
25
26
27
|
drop function auth.get_active_user_by_id (
p_user_id bigint
);
create or replace function auth.get_active_user_by_id (
p_user_id bigint
)
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
where u.id = p_user_id
and u.active = true;
return;
end;
$$ language plpgsql;
|