IS_USER_APPLICANT
DDL scriptArguments:
| Name | Data Type | Default Value | In/Out |
|---|
| USER_ID_IN | NUMBER(38) | | IN |
Returns:
NUMBER(38)Source
Legend: string keyword reserved word operator
1: function
2: is_user_applicant
3: (
4: user_id_in IN number
5: )
6: return number
7: is
8: org_id_val number;
9: app_group_val number;
10: applicant number;
11: begin
12: select org_id into org_id_val
13: from web_contact
14: where id = user_id_in;
15:
16: select id into app_group_val
17: from rhnUserGroup
18: where org_id = org_id_val
19: and group_type = (
20: select id
21: from rhnUserGroupType
22: where label = 'org_applicant'
23: );
24:
25: select count(1) into applicant
26: from rhnUserGroupMembers
27: where user_group_id = app_group_val
28: and user_id = user_id_in;
29:
30: return applicant;
31: end;