6: -------------------------------------------------------------------------------
7: function map_sso_user_profiles(p_user_name in varchar2)
8: return fnd_oid_util.apps_sso_user_profiles_type is
9:
10: cursor cur_fnd_users is
11: select user_id
12: from fnd_user
13: where user_name = p_user_name;
14:
8: return fnd_oid_util.apps_sso_user_profiles_type is
9:
10: cursor cur_fnd_users is
11: select user_id
12: from fnd_user
13: where user_name = p_user_name;
14:
15: l_module_source varchar2(256);
16: l_rec cur_fnd_users%rowtype;
12: from fnd_user
13: where user_name = p_user_name;
14:
15: l_module_source varchar2(256);
16: l_rec cur_fnd_users%rowtype;
17: l_found boolean;
18: l_val varchar2(80);
19: l_defined boolean;
20: l_user_profiles fnd_oid_util.apps_sso_user_profiles_type;
28: then
29: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
30: end if;
31:
32: open cur_fnd_users;
33: fetch cur_fnd_users into l_rec;
34: l_found := cur_fnd_users%found;
35: close cur_fnd_users;
36:
29: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
30: end if;
31:
32: open cur_fnd_users;
33: fetch cur_fnd_users into l_rec;
34: l_found := cur_fnd_users%found;
35: close cur_fnd_users;
36:
37: if (not l_found)
30: end if;
31:
32: open cur_fnd_users;
33: fetch cur_fnd_users into l_rec;
34: l_found := cur_fnd_users%found;
35: close cur_fnd_users;
36:
37: if (not l_found)
38: then
31:
32: open cur_fnd_users;
33: fetch cur_fnd_users into l_rec;
34: l_found := cur_fnd_users%found;
35: close cur_fnd_users;
36:
37: if (not l_found)
38: then
39: raise no_such_user_exp;
91: return (l_user_profiles);
92:
93: exception
94: when no_such_user_exp then
95: if (cur_fnd_users%isopen)
96: then
97: close cur_fnd_users;
98: end if;
99: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
93: exception
94: when no_such_user_exp then
95: if (cur_fnd_users%isopen)
96: then
97: close cur_fnd_users;
98: end if;
99: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
100: then
101: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source,
98: end if;
99: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
100: then
101: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source,
102: 'no_such_user_exp: No matching record for FND_USER.user_name = ' ||
103: p_user_name);
104: end if;
105: raise;
106: return null;
105: raise;
106: return null;
107:
108: when others then
109: if (cur_fnd_users%isopen)
110: then
111: close cur_fnd_users;
112: end if;
113: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
107:
108: when others then
109: if (cur_fnd_users%isopen)
110: then
111: close cur_fnd_users;
112: end if;
113: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
114: then
115: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
219: and entity_key_value = p_entity_key_value
220: and attribute_name <> fnd_oid_util.G_CACHE_CHANGED;
221: cursor cur_user_guid is
222: select user_guid
223: from fnd_user
224: where user_name = p_entity_key_value;
225:
226: l_module_source varchar2(256);
227: l_pwd varchar2(256);
230: l_ldap_attr ldap_attr;
231: l_start_date date;
232: l_end_date date;
233: l_username_changed boolean;
234: l_oid_nickname fnd_user.user_name%type;
235: l_old_fnd_username fnd_user.user_name%type;
236: l_new_fnd_username fnd_user.user_name%type;
237: l_nicknameattr varchar2(256);
238:
231: l_start_date date;
232: l_end_date date;
233: l_username_changed boolean;
234: l_oid_nickname fnd_user.user_name%type;
235: l_old_fnd_username fnd_user.user_name%type;
236: l_new_fnd_username fnd_user.user_name%type;
237: l_nicknameattr varchar2(256);
238:
239: begin
232: l_end_date date;
233: l_username_changed boolean;
234: l_oid_nickname fnd_user.user_name%type;
235: l_old_fnd_username fnd_user.user_name%type;
236: l_new_fnd_username fnd_user.user_name%type;
237: l_nicknameattr varchar2(256);
238:
239: begin
240: l_module_source := G_MODULE_SOURCE || 'map_ldap_attr_list: ';
255: for l_rec in cur_attribute_cache
256: loop
257: if (l_rec.attribute_name = 'OLD_USER_NAME') then
258: l_username_changed := true;
259: l_old_fnd_username := l_rec.attribute_value;
260: end if;
261:
262: if (l_rec.attribute_name = 'USER_NAME') then
263: l_new_fnd_username := l_rec.attribute_value;
259: l_old_fnd_username := l_rec.attribute_value;
260: end if;
261:
262: if (l_rec.attribute_name = 'USER_NAME') then
263: l_new_fnd_username := l_rec.attribute_value;
264: end if;
265:
266: if (l_rec.attribute_name = fnd_oid_util.G_ORCLGUID)
267: then
460: fnd_oid_util.get_ldap_attr_str(l_ldap_attr));
461: end if;
462: else
463: l_oid_nickname := upper(fnd_oid_util.get_oid_nickname(p_ldap_key.orclGUID));
464: if l_username_changed and l_oid_nickname = l_old_fnd_username then
465: -- Fixed bug 4309356:
466: --Change USER_NAME - but only if old fnd and OID user names are the same
467: l_ldap_attr := ldap_attr(
468: 'USER_NAME'
465: -- Fixed bug 4309356:
466: --Change USER_NAME - but only if old fnd and OID user names are the same
467: l_ldap_attr := ldap_attr(
468: 'USER_NAME'
469: , l_new_fnd_username
470: , null
471: , length(l_new_fnd_username)
472: , wf_oid.ATTR_TYPE_STRING
473: , WF_OID.MOD_REPLACE);
467: l_ldap_attr := ldap_attr(
468: 'USER_NAME'
469: , l_new_fnd_username
470: , null
471: , length(l_new_fnd_username)
472: , wf_oid.ATTR_TYPE_STRING
473: , WF_OID.MOD_REPLACE);
474: p_ldap_attr_list.extend;
475: p_ldap_attr_list(l_index) := l_ldap_attr;
659: end map_ldap_message;
660: --
661: -------------------------------------------------------------------------------
662: procedure map_ldap_message(
663: p_user_name in fnd_user.user_name%type
664: , p_ldap_attr_list in ldap_attr_list
665: , p_ldap_message in out nocopy fnd_oid_util.ldap_message_type
666: ) is
667: