DBA Data[Home] [Help]

APPS.FND_USER_PKG dependencies on FND_USER

Line 1: package body FND_USER_PKG as

1: package body FND_USER_PKG as
2: /* $Header: AFSCUSRB.pls 120.63.12020000.3 2012/10/11 02:40:37 ctilley ship $ */
3:
4: /* START PARTY */
5: C_PKG_NAME CONSTANT VARCHAR2(30) := 'FND_USER_PKG';

Line 5: C_PKG_NAME CONSTANT VARCHAR2(30) := 'FND_USER_PKG';

1: package body FND_USER_PKG as
2: /* $Header: AFSCUSRB.pls 120.63.12020000.3 2012/10/11 02:40:37 ctilley ship $ */
3:
4: /* START PARTY */
5: C_PKG_NAME CONSTANT VARCHAR2(30) := 'FND_USER_PKG';
6: C_LOG_HEAD CONSTANT VARCHAR2(30) := 'fnd.plsql.FND_USER_PKG.';
7:
8: /* One level cache for derive_person_party_id */
9: Z_EMPLOYEE_ID NUMBER := NULL;

Line 6: C_LOG_HEAD CONSTANT VARCHAR2(30) := 'fnd.plsql.FND_USER_PKG.';

2: /* $Header: AFSCUSRB.pls 120.63.12020000.3 2012/10/11 02:40:37 ctilley ship $ */
3:
4: /* START PARTY */
5: C_PKG_NAME CONSTANT VARCHAR2(30) := 'FND_USER_PKG';
6: C_LOG_HEAD CONSTANT VARCHAR2(30) := 'fnd.plsql.FND_USER_PKG.';
7:
8: /* One level cache for derive_person_party_id */
9: Z_EMPLOYEE_ID NUMBER := NULL;
10: Z_CUSTOMER_ID NUMBER := NULL;

Line 29: /* bug 13472484 - FND_USER_PKG.UpdateUserInternal sets this var to be used from the following flow

25:
26: -- bug 8227171
27: g_event_controller varchar2(10);
28:
29: /* bug 13472484 - FND_USER_PKG.UpdateUserInternal sets this var to be used from the following flow
30: * UpdateUserInternal -> fnd_web_sec.change_password ->
31: * fnd_user_pkg.ldap_wrapper_update_user. This var is to indicate whether to pass expiry flag to ldap wrapper
32: * when called from fnd_web_sec.change_password APIs since this calculation is
33: * done in UpdateUserInternal already.

Line 31: * fnd_user_pkg.ldap_wrapper_update_user. This var is to indicate whether to pass expiry flag to ldap wrapper

27: g_event_controller varchar2(10);
28:
29: /* bug 13472484 - FND_USER_PKG.UpdateUserInternal sets this var to be used from the following flow
30: * UpdateUserInternal -> fnd_web_sec.change_password ->
31: * fnd_user_pkg.ldap_wrapper_update_user. This var is to indicate whether to pass expiry flag to ldap wrapper
32: * when called from fnd_web_sec.change_password APIs since this calculation is
33: * done in UpdateUserInternal already.
34: */
35: G_EXPIRE_USER_PWD pls_integer := NULL;

Line 176: from fnd_user

172:
173: -- bug 10371150 Add supplier_id
174: cursor usercur is
175: select customer_id, employee_id, person_party_id, user_guid, supplier_id
176: from fnd_user
177: where user_name = upper(x_user_name);
178:
179: -- Bug 5235329
180: l_expire_pwd pls_integer;

Line 225: from fnd_user

221: -- Bug4680643 get values for start_date and end_date from the database.
222: -- Bug 7311525 get the user_id now so we can use it for identifying GUEST
223: select start_date, end_date, user_id
224: into l_start_date, l_end_date, l_user_id
225: from fnd_user
226: where user_name = upper(x_user_name);
227:
228: -- Bug4680643 Determine and set the value of start_date and end_date
229: -- outside of the decode statement which was truncating the actual

Line 232: if (x_start_date = fnd_user_pkg.null_date) then

228: -- Bug4680643 Determine and set the value of start_date and end_date
229: -- outside of the decode statement which was truncating the actual
230: -- value when it is already set.
231:
232: if (x_start_date = fnd_user_pkg.null_date) then
233: -- For this if condition error exception needs to be raised as
234: -- start date cannot be null. This will be resolved through a new bug.
235: l_start_date := null;
236: elsif (x_start_date is not null) then

Line 256: if (x_end_date = fnd_user_pkg.null_date) then

252:
253: -- Bug 4901996. Truncate the time stamp
254: l_start_date := trunc(l_start_date);
255:
256: if (x_end_date = fnd_user_pkg.null_date) then
257: l_end_date := null;
258: elsif (x_end_date is not null) then
259: -- Bug 7311525 make sure we do not permit GUEST to be end-dated
260: if (l_user_id <> 6) then

Line 272: select decode(x_session_number, fnd_user_pkg.null_number, null,

268:
269: -- Translate *NULL* parameter values into real nulls,
270: -- treat null values as no-change.
271: begin
272: select decode(x_session_number, fnd_user_pkg.null_number, null,
273: null, u.session_number,
274: x_session_number),
275: -- bug 6608790 this preserves timestamp for iRecruitement
276: decode(x_last_logon_date, fnd_user_pkg.null_date, to_date(null),

Line 276: decode(x_last_logon_date, fnd_user_pkg.null_date, to_date(null),

272: select decode(x_session_number, fnd_user_pkg.null_number, null,
273: null, u.session_number,
274: x_session_number),
275: -- bug 6608790 this preserves timestamp for iRecruitement
276: decode(x_last_logon_date, fnd_user_pkg.null_date, to_date(null),
277: to_date(null), u.last_logon_date,
278: x_last_logon_date),
279: decode(x_description, fnd_user_pkg.null_char, null,
280: null, u.description,

Line 279: decode(x_description, fnd_user_pkg.null_char, null,

275: -- bug 6608790 this preserves timestamp for iRecruitement
276: decode(x_last_logon_date, fnd_user_pkg.null_date, to_date(null),
277: to_date(null), u.last_logon_date,
278: x_last_logon_date),
279: decode(x_description, fnd_user_pkg.null_char, null,
280: null, u.description,
281: x_description),
282: decode(x_password_date, fnd_user_pkg.null_date, null,
283: null, u.password_date,

Line 282: decode(x_password_date, fnd_user_pkg.null_date, null,

278: x_last_logon_date),
279: decode(x_description, fnd_user_pkg.null_char, null,
280: null, u.description,
281: x_description),
282: decode(x_password_date, fnd_user_pkg.null_date, null,
283: null, u.password_date,
284: x_password_date),
285: decode(x_password_accesses_left, fnd_user_pkg.null_number, null,
286: null, u.password_accesses_left,

Line 285: decode(x_password_accesses_left, fnd_user_pkg.null_number, null,

281: x_description),
282: decode(x_password_date, fnd_user_pkg.null_date, null,
283: null, u.password_date,
284: x_password_date),
285: decode(x_password_accesses_left, fnd_user_pkg.null_number, null,
286: null, u.password_accesses_left,
287: x_password_accesses_left),
288: decode(x_password_lifespan_accesses, fnd_user_pkg.null_number, null,
289: null, u.password_lifespan_accesses,

Line 288: decode(x_password_lifespan_accesses, fnd_user_pkg.null_number, null,

284: x_password_date),
285: decode(x_password_accesses_left, fnd_user_pkg.null_number, null,
286: null, u.password_accesses_left,
287: x_password_accesses_left),
288: decode(x_password_lifespan_accesses, fnd_user_pkg.null_number, null,
289: null, u.password_lifespan_accesses,
290: x_password_lifespan_accesses),
291: decode(x_password_lifespan_days, fnd_user_pkg.null_number, null,
292: null, u.password_lifespan_days,

Line 291: decode(x_password_lifespan_days, fnd_user_pkg.null_number, null,

287: x_password_accesses_left),
288: decode(x_password_lifespan_accesses, fnd_user_pkg.null_number, null,
289: null, u.password_lifespan_accesses,
290: x_password_lifespan_accesses),
291: decode(x_password_lifespan_days, fnd_user_pkg.null_number, null,
292: null, u.password_lifespan_days,
293: x_password_lifespan_days),
294: decode(x_employee_id, fnd_user_pkg.null_number, null,
295: null, u.employee_id,

Line 294: decode(x_employee_id, fnd_user_pkg.null_number, null,

290: x_password_lifespan_accesses),
291: decode(x_password_lifespan_days, fnd_user_pkg.null_number, null,
292: null, u.password_lifespan_days,
293: x_password_lifespan_days),
294: decode(x_employee_id, fnd_user_pkg.null_number, null,
295: null, u.employee_id,
296: x_employee_id),
297: decode(x_email_address, fnd_user_pkg.null_char, null,
298: null, u.email_address,

Line 297: decode(x_email_address, fnd_user_pkg.null_char, null,

293: x_password_lifespan_days),
294: decode(x_employee_id, fnd_user_pkg.null_number, null,
295: null, u.employee_id,
296: x_employee_id),
297: decode(x_email_address, fnd_user_pkg.null_char, null,
298: null, u.email_address,
299: x_email_address),
300: decode(x_fax, fnd_user_pkg.null_char, null,
301: null, u.fax,

Line 300: decode(x_fax, fnd_user_pkg.null_char, null,

296: x_employee_id),
297: decode(x_email_address, fnd_user_pkg.null_char, null,
298: null, u.email_address,
299: x_email_address),
300: decode(x_fax, fnd_user_pkg.null_char, null,
301: null, u.fax,
302: x_fax),
303: decode(x_customer_id, fnd_user_pkg.null_number, null,
304: null, u.customer_id,

Line 303: decode(x_customer_id, fnd_user_pkg.null_number, null,

299: x_email_address),
300: decode(x_fax, fnd_user_pkg.null_char, null,
301: null, u.fax,
302: x_fax),
303: decode(x_customer_id, fnd_user_pkg.null_number, null,
304: null, u.customer_id,
305: x_customer_id),
306: decode(x_supplier_id, fnd_user_pkg.null_number, null,
307: null, u.supplier_id,

Line 306: decode(x_supplier_id, fnd_user_pkg.null_number, null,

302: x_fax),
303: decode(x_customer_id, fnd_user_pkg.null_number, null,
304: null, u.customer_id,
305: x_customer_id),
306: decode(x_supplier_id, fnd_user_pkg.null_number, null,
307: null, u.supplier_id,
308: x_supplier_id),
309: decode(x_person_party_id, fnd_user_pkg.null_number, null,
310: null, u.person_party_id,

Line 309: decode(x_person_party_id, fnd_user_pkg.null_number, null,

305: x_customer_id),
306: decode(x_supplier_id, fnd_user_pkg.null_number, null,
307: null, u.supplier_id,
308: x_supplier_id),
309: decode(x_person_party_id, fnd_user_pkg.null_number, null,
310: null, u.person_party_id,
311: x_person_party_id),
312: decode(x_user_guid, fnd_user_pkg.null_raw, null,
313: null, u.user_guid,

Line 312: decode(x_user_guid, fnd_user_pkg.null_raw, null,

308: x_supplier_id),
309: decode(x_person_party_id, fnd_user_pkg.null_number, null,
310: null, u.person_party_id,
311: x_person_party_id),
312: decode(x_user_guid, fnd_user_pkg.null_raw, null,
313: null, u.user_guid,
314: x_user_guid )
315: into l_session_number,
316: l_last_logon_date, l_description, l_password_date,

Line 321: from fnd_user u

317: l_password_accesses_left, l_password_lifespan_accesses,
318: l_password_lifespan_days, l_employee_id,
319: l_email_address, l_fax, l_customer_id, l_supplier_id,
320: l_person_party_id , l_user_guid
321: from fnd_user u
322: where u.user_name = upper(x_user_name);
323: exception
324: when others then
325: fnd_message.set_name('FND', 'FND_INVALID_USER');

Line 337: fnd_user_pkg.derive_customer_employee_id(x_user_name, l_person_party_id, l_customer_id, l_employee_id);

333: -- Derive customer/employee_ids from party_id
334: -- This was added to fix Bug#3663908
335: if (nvl(l_old_person_party_id, 0) <> nvl(l_person_party_id, 0)) then
336:
337: fnd_user_pkg.derive_customer_employee_id(x_user_name, l_person_party_id, l_customer_id, l_employee_id);
338:
339: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
340: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head || l_api_name,'Derive employee_id = '||l_employee_id||
341: ' derived customer_id = '||l_customer_id);

Line 350: l_person_party_id := fnd_user_pkg.derive_person_party_id(x_user_name, l_customer_id, l_employee_id);

346: -- Derive the party_id from the customer/employee_ids.
347: -- This was added to fix Bug#3663908
348: if (nvl(l_old_customer_id, 0) <> nvl(l_customer_id, 0)) or (nvl(l_old_employee_id, 0) <> nvl(l_employee_id, 0)) then
349:
350: l_person_party_id := fnd_user_pkg.derive_person_party_id(x_user_name, l_customer_id, l_employee_id);
351:
352: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
353: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head || l_api_name,'Derive party id = '||l_person_party_id);
354: end if;

Line 497: update fnd_user set

493: 'and l_supplier_id = '||l_supplier_id);
494: end if;
495:
496: -- Update all of the non-password columns
497: update fnd_user set
498: last_update_date = x_last_update_date,
499: last_updated_by = owner_id,
500: last_update_login = owner_id,
501: session_number = l_session_number,

Line 539: x_change_source <> fnd_user_pkg.change_source_oid ) then

535: end if;
536:
537: -- Enhancement 5027812
538: if (x_change_source is null or
539: x_change_source <> fnd_user_pkg.change_source_oid ) then
540: begin
541:
542: -- Bug 13472484 - removed the passing of the password since the password
543: -- will be changed higher up in the call to fnd_web_sec.change_password.

Line 563: fnd_message.set_name('FND', 'FND_USER_UPDATE_FAILED');

559: exception
560: when others then
561: ROLLBACK to update_user;
562: reason := fnd_message.get();
563: fnd_message.set_name('FND', 'FND_USER_UPDATE_FAILED');
564: fnd_message.set_token('USERNAME', X_USER_NAME);
565: fnd_message.set_token('USERID', l_user_id);
566: fnd_message.set_token('REASON', reason);
567: app_exception.raise_exception;

Line 842: fnd_user_pkg.user_synch(x_user_name);

838: end;
839: end if;
840:
841: -- Sync user change to LDAP
842: fnd_user_pkg.user_synch(x_user_name);
843:
844: -- Bug 8227171 UpdateUserInternal
845: -- Raise WF event oracle.apps.fnd.post.user.update
846: if (nvl(g_event_controller, 'XXXX') <> 'CREATE') then

Line 939: fnd_user_pkg.LOAD_ROW (

935: X_EMAIL_ADDRESS in VARCHAR2,
936: X_FAX in VARCHAR2 ) is
937:
938: begin
939: fnd_user_pkg.LOAD_ROW (
940: X_USER_NAME=>X_USER_NAME,
941: X_OWNER=> X_OWNER,
942: X_ENCRYPTED_USER_PASSWORD=>X_ENCRYPTED_USER_PASSWORD,
943: X_SESSION_NUMBER=> X_SESSION_NUMBER,

Line 1015: -- the fnd_user update below for completeness.

1011:
1012: -- bug 4047740 - as a byproduct of FND_WEB_SEC.set_reencrypted_password
1013: -- NOT calling change_password we need this check to complete the checks
1014: -- below as in FND_WEB_SEC - also added update to both encrypted rows for
1015: -- the fnd_user update below for completeness.
1016: if(false = fnd_sso_manager.isPasswordChangeable(puser_name)) then
1017: encPwd := 'EXTERNAL';
1018: else
1019: encPwd := pcrypt_pass;

Line 1025: update fnd_user

1021:
1022: if (encPwd in ('EXTERNAL', 'INVALID')) then
1023: -- The password was 'EXTERNAL' or 'INVALID', just set it directly
1024: -- without trying to re-encrypt
1025: update fnd_user
1026: set encrypted_foundation_password = encPwd,
1027: encrypted_user_password = encPwd
1028: where user_name = puser_name;
1029:

Line 1035: ret := fnd_user_pkg.SetReEncryptedPassword(puser_name, encPwd, 'LOADER');

1031: if (encPwd = 'INVALID') then
1032: fnd_file.put_line(fnd_file.Log,'Invalid password for user ' ||puser_name );
1033: end if;
1034: else
1035: ret := fnd_user_pkg.SetReEncryptedPassword(puser_name, encPwd, 'LOADER');
1036: end if;
1037: END;
1038:
1039: begin

Line 1050: if (X_END_DATE = fnd_user_pkg.null_char) then

1046: /*Bug2896887 - Modified code to analyze and set up the correct value
1047: for the nullable parameters to be passed to the
1048: UpdateUser and CreateUser procedures. */
1049:
1050: if (X_END_DATE = fnd_user_pkg.null_char) then
1051: l_end_date := fnd_user_pkg.null_date;
1052: else -- bug 7311525 prevent upload of non-null end date for GUEST
1053: if (UPPER(x_user_name) <> 'GUEST') then
1054: l_end_date := to_date(X_END_DATE, 'YYYY/MM/DD');

Line 1051: l_end_date := fnd_user_pkg.null_date;

1047: for the nullable parameters to be passed to the
1048: UpdateUser and CreateUser procedures. */
1049:
1050: if (X_END_DATE = fnd_user_pkg.null_char) then
1051: l_end_date := fnd_user_pkg.null_date;
1052: else -- bug 7311525 prevent upload of non-null end date for GUEST
1053: if (UPPER(x_user_name) <> 'GUEST') then
1054: l_end_date := to_date(X_END_DATE, 'YYYY/MM/DD');
1055: else

Line 1060: if (X_PASSWORD_DATE = fnd_user_pkg.null_char) then

1056: l_end_date := null;
1057: end if;
1058: end if;
1059:
1060: if (X_PASSWORD_DATE = fnd_user_pkg.null_char) then
1061: l_password_date := fnd_user_pkg.null_date;
1062: else
1063: l_password_date := to_date(X_PASSWORD_DATE, 'YYYY/MM/DD');
1064: end if;

Line 1061: l_password_date := fnd_user_pkg.null_date;

1057: end if;
1058: end if;
1059:
1060: if (X_PASSWORD_DATE = fnd_user_pkg.null_char) then
1061: l_password_date := fnd_user_pkg.null_date;
1062: else
1063: l_password_date := to_date(X_PASSWORD_DATE, 'YYYY/MM/DD');
1064: end if;
1065:

Line 1066: if (X_LAST_LOGON_DATE = fnd_user_pkg.null_char) then

1062: else
1063: l_password_date := to_date(X_PASSWORD_DATE, 'YYYY/MM/DD');
1064: end if;
1065:
1066: if (X_LAST_LOGON_DATE = fnd_user_pkg.null_char) then
1067: l_last_logon_date := fnd_user_pkg.null_date;
1068: else
1069: l_last_logon_date := to_date(X_LAST_LOGON_DATE, 'YYYY/MM/DD');
1070: end if;

Line 1067: l_last_logon_date := fnd_user_pkg.null_date;

1063: l_password_date := to_date(X_PASSWORD_DATE, 'YYYY/MM/DD');
1064: end if;
1065:
1066: if (X_LAST_LOGON_DATE = fnd_user_pkg.null_char) then
1067: l_last_logon_date := fnd_user_pkg.null_date;
1068: else
1069: l_last_logon_date := to_date(X_LAST_LOGON_DATE, 'YYYY/MM/DD');
1070: end if;
1071:

Line 1072: if (X_PASSWORD_ACCESSES_LEFT = fnd_user_pkg.null_char) then

1068: else
1069: l_last_logon_date := to_date(X_LAST_LOGON_DATE, 'YYYY/MM/DD');
1070: end if;
1071:
1072: if (X_PASSWORD_ACCESSES_LEFT = fnd_user_pkg.null_char) then
1073: l_password_accesses_left := fnd_user_pkg.null_number;
1074: else
1075: l_password_accesses_left := to_number(X_PASSWORD_ACCESSES_LEFT);
1076: end if;

Line 1073: l_password_accesses_left := fnd_user_pkg.null_number;

1069: l_last_logon_date := to_date(X_LAST_LOGON_DATE, 'YYYY/MM/DD');
1070: end if;
1071:
1072: if (X_PASSWORD_ACCESSES_LEFT = fnd_user_pkg.null_char) then
1073: l_password_accesses_left := fnd_user_pkg.null_number;
1074: else
1075: l_password_accesses_left := to_number(X_PASSWORD_ACCESSES_LEFT);
1076: end if;
1077:

Line 1078: if (X_PASSWORD_LIFESPAN_ACCESSES = fnd_user_pkg.null_char) then

1074: else
1075: l_password_accesses_left := to_number(X_PASSWORD_ACCESSES_LEFT);
1076: end if;
1077:
1078: if (X_PASSWORD_LIFESPAN_ACCESSES = fnd_user_pkg.null_char) then
1079: l_password_lifespan_accesses := fnd_user_pkg.null_number;
1080: else
1081: l_password_lifespan_accesses := to_number(X_PASSWORD_LIFESPAN_ACCESSES);
1082: end if;

Line 1079: l_password_lifespan_accesses := fnd_user_pkg.null_number;

1075: l_password_accesses_left := to_number(X_PASSWORD_ACCESSES_LEFT);
1076: end if;
1077:
1078: if (X_PASSWORD_LIFESPAN_ACCESSES = fnd_user_pkg.null_char) then
1079: l_password_lifespan_accesses := fnd_user_pkg.null_number;
1080: else
1081: l_password_lifespan_accesses := to_number(X_PASSWORD_LIFESPAN_ACCESSES);
1082: end if;
1083:

Line 1084: if (X_PASSWORD_LIFESPAN_DAYS = fnd_user_pkg.null_char) then

1080: else
1081: l_password_lifespan_accesses := to_number(X_PASSWORD_LIFESPAN_ACCESSES);
1082: end if;
1083:
1084: if (X_PASSWORD_LIFESPAN_DAYS = fnd_user_pkg.null_char) then
1085: l_password_lifespan_days := fnd_user_pkg.null_number;
1086: else
1087: l_password_lifespan_days := to_number(X_PASSWORD_LIFESPAN_DAYS);
1088: end if;

Line 1085: l_password_lifespan_days := fnd_user_pkg.null_number;

1081: l_password_lifespan_accesses := to_number(X_PASSWORD_LIFESPAN_ACCESSES);
1082: end if;
1083:
1084: if (X_PASSWORD_LIFESPAN_DAYS = fnd_user_pkg.null_char) then
1085: l_password_lifespan_days := fnd_user_pkg.null_number;
1086: else
1087: l_password_lifespan_days := to_number(X_PASSWORD_LIFESPAN_DAYS);
1088: end if;
1089:

Line 1093: from FND_USER

1089:
1090: begin
1091: select LAST_UPDATED_BY, LAST_UPDATE_DATE
1092: into db_luby, db_ludate
1093: from FND_USER
1094: where USER_NAME = X_USER_NAME;
1095:
1096: /* PARTY */
1097: l_person_party_id := null;

Line 1139: fnd_user_pkg.createuser(

1135: exception
1136: when no_data_found then
1137: -- bug 4047740 changed dummy password from 'welcome' to new FND_WEB_SEC
1138: -- constant, requires AFSCJAVS.pls 115.27 and AFSCJAVB.pls 115.63
1139: fnd_user_pkg.createuser(
1140: X_USER_NAME,
1141: X_OWNER, -- bug 7687370
1142: FND_WEB_SEC.INVALID_PWD,
1143: to_number(X_SESSION_NUMBER),

Line 1238: x_change_source <> fnd_user_pkg.CHANGE_SOURCE_OID) and

1234:
1235: if (ret = 'Y') then
1236: -- Enhancement 5027812
1237: if ((x_change_source is null or
1238: x_change_source <> fnd_user_pkg.CHANGE_SOURCE_OID) and
1239: pwd <> fnd_web_sec.external_pwd) then
1240: -- We need to translate the external constant to null. Otherwise
1241: -- fnd_ldap_wrapper.create_user will use that constant as real password.
1242: if (pwd = fnd_web_sec.external_pwd) then

Line 1263: -- Bug 13713119 Decode the fnd_user_pkg.null_date and fnd_user_pkg.null_number

1259: -- Bug 13707735 - removed the condition that was added for bug 13595376
1260: -- this condition is incorrect - removed from both create and update flows.
1261: -- NOTE: This condition should be the same as used in FND_SIGNON.IS_PWD_EXPIRED
1262:
1263: -- Bug 13713119 Decode the fnd_user_pkg.null_date and fnd_user_pkg.null_number
1264: -- values that may be passed to indicate a null. These variables should only be
1265: -- used to calculate expiration and not passed to the UpdateUserInternal API - this API
1266: -- does its own calculation
1267:

Line 1268: if (x_password_date = fnd_user_pkg.null_date) then

1264: -- values that may be passed to indicate a null. These variables should only be
1265: -- used to calculate expiration and not passed to the UpdateUserInternal API - this API
1266: -- does its own calculation
1267:
1268: if (x_password_date = fnd_user_pkg.null_date) then
1269: l_password_date := null;
1270: else
1271: l_password_date := x_password_date;
1272: end if;

Line 1274: if (x_password_accesses_left = fnd_user_pkg.null_number) then

1270: else
1271: l_password_date := x_password_date;
1272: end if;
1273:
1274: if (x_password_accesses_left = fnd_user_pkg.null_number) then
1275: l_password_accesses_left := null;
1276: else
1277: l_password_accesses_left := x_password_accesses_left;
1278: end if;

Line 1280: if (x_password_lifespan_accesses = fnd_user_pkg.null_number) then

1276: else
1277: l_password_accesses_left := x_password_accesses_left;
1278: end if;
1279:
1280: if (x_password_lifespan_accesses = fnd_user_pkg.null_number) then
1281: l_password_lifespan_accesses := null;
1282: else
1283: l_password_lifespan_accesses := x_password_lifespan_accesses;
1284: end if;

Line 1286: if (x_password_lifespan_days = fnd_user_pkg.null_number) then

1282: else
1283: l_password_lifespan_accesses := x_password_lifespan_accesses;
1284: end if;
1285:
1286: if (x_password_lifespan_days = fnd_user_pkg.null_number) then
1287: l_password_lifespan_days := null;
1288: else
1289: l_password_lifespan_days := x_password_lifespan_days;
1290: end if;

Line 1347: update fnd_user

1343: end if;
1344:
1345: -- the createuser java code uses the user_id as created_by which
1346: -- is not correct. We must correct here.
1347: update fnd_user
1348: set created_by = owner_id
1349: where user_name = upper(x_user_name);
1350:
1351: -- update the rest of the data except password

Line 1355: 'CreateUser(): calling fnd_user_pkg.UpdateUser');

1351: -- update the rest of the data except password
1352: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
1353: fnd_log.string(FND_LOG.LEVEL_STATEMENT,
1354: c_log_head || l_api_name || '.call_upduser',
1355: 'CreateUser(): calling fnd_user_pkg.UpdateUser');
1356: end if;
1357:
1358: -- bug 8227171 Use the event controller global to tell the
1359: -- update user event not to fire since the create event will

Line 1368: -- fnd_user_pkg.UpdateUserParty(

1364: -- so that the user synch code in UpdateUser is triggered.
1365: -- Don't change this without taking that into account.
1366: --
1367: if (x_mode = 'PARTY') then
1368: -- fnd_user_pkg.UpdateUserParty(
1369: -- Begin bug 4318754, 4424225
1370: -- In order to handle user_guid, calls UpdateUserInternal directly
1371: -- instead of UpdateUserParty which does not take user_guid as argument.
1372: fnd_user_pkg.UpdateUserInternal(

Line 1372: fnd_user_pkg.UpdateUserInternal(

1368: -- fnd_user_pkg.UpdateUserParty(
1369: -- Begin bug 4318754, 4424225
1370: -- In order to handle user_guid, calls UpdateUserInternal directly
1371: -- instead of UpdateUserParty which does not take user_guid as argument.
1372: fnd_user_pkg.UpdateUserInternal(
1373: -- End bug 4318754, 4424225
1374: x_user_name => x_user_name,
1375: x_owner => x_owner,
1376: x_unencrypted_password => l_oid_pwd,

Line 1395: x_change_source => fnd_user_pkg.change_source_oid);

1391: x_person_party_id => x_person_party_id,
1392: x_old_password => null,
1393: x_mode => 'PARTY',
1394: x_user_guid => l_user_guid,
1395: x_change_source => fnd_user_pkg.change_source_oid);
1396: else
1397: fnd_user_pkg.UpdateUser(
1398: x_user_name => x_user_name,
1399: x_owner => x_owner,

Line 1397: fnd_user_pkg.UpdateUser(

1393: x_mode => 'PARTY',
1394: x_user_guid => l_user_guid,
1395: x_change_source => fnd_user_pkg.change_source_oid);
1396: else
1397: fnd_user_pkg.UpdateUser(
1398: x_user_name => x_user_name,
1399: x_owner => x_owner,
1400: x_unencrypted_password => l_oid_pwd,
1401: x_session_number => x_session_number,

Line 1417: x_change_source => fnd_user_pkg.change_source_oid);

1413: x_customer_id => x_customer_id,
1414: x_supplier_id => x_supplier_id,
1415: x_old_password => null,
1416: x_user_guid => l_user_guid,
1417: x_change_source => fnd_user_pkg.change_source_oid);
1418: end if;
1419:
1420: -- bug 8227171 CreateUserIdInternal
1421: -- Raise the WF event oracle.apps.fnd.post.user.create

Line 1460: -- Insert new user record into FND_USER table.

1456:
1457: ----------------------------------------------------------------------
1458: --
1459: -- CreateUserId (PUBLIC)
1460: -- Insert new user record into FND_USER table.
1461: -- If that user exists already, exception raised with the error message.
1462: -- There are three input arguments must be provided. All the other columns
1463: -- in FND_USER table can take the default value.
1464: --

Line 1463: -- in FND_USER table can take the default value.

1459: -- CreateUserId (PUBLIC)
1460: -- Insert new user record into FND_USER table.
1461: -- If that user exists already, exception raised with the error message.
1462: -- There are three input arguments must be provided. All the other columns
1463: -- in FND_USER table can take the default value.
1464: --
1465: -- *** NOTE: This version accepts the old customer_id/employee_id
1466: -- keys foreign keys to the "person". Use CreateUserIdParty to create
1467: -- a user with the new person_party_id key.

Line 1521: -- Insert new user record into FND_USER table.

1517:
1518: ----------------------------------------------------------------------
1519: --
1520: -- CreateUserIdParty (PUBLIC)
1521: -- Insert new user record into FND_USER table.
1522: -- If that user exists already, exception raised with the error message.
1523: -- There are three input arguments must be provided. All the other columns
1524: -- in FND_USER table can take the default value.
1525: --

Line 1524: -- in FND_USER table can take the default value.

1520: -- CreateUserIdParty (PUBLIC)
1521: -- Insert new user record into FND_USER table.
1522: -- If that user exists already, exception raised with the error message.
1523: -- There are three input arguments must be provided. All the other columns
1524: -- in FND_USER table can take the default value.
1525: --
1526: -- *** NOTE: This version accepts the new person_party_id foreign key
1527: -- to the "person". Use CreateUserId to create a user with the old
1528: -- customer_id/employee_id keys.

Line 1580: -- Insert new user record into FND_USER table.

1576:
1577: ----------------------------------------------------------------------
1578: --
1579: -- CreateUser (PUBLIC)
1580: -- Insert new user record into FND_USER table.
1581: -- If that user exists already, exception raised with the error message.
1582: -- There are three input arguments must be provided. All the other columns
1583: -- in FND_USER table can take the default value.
1584: --

Line 1583: -- in FND_USER table can take the default value.

1579: -- CreateUser (PUBLIC)
1580: -- Insert new user record into FND_USER table.
1581: -- If that user exists already, exception raised with the error message.
1582: -- There are three input arguments must be provided. All the other columns
1583: -- in FND_USER table can take the default value.
1584: --
1585: -- *** NOTE: This version accepts the old customer_id/employee_id
1586: -- keys foreign keys to the "person". Use CreateUserParty to create
1587: -- a user with the new person_party_id key.

Line 1615: dummy := fnd_user_pkg.CreateUserId(

1611: x_supplier_id in number default null)
1612: is
1613: dummy number;
1614: begin
1615: dummy := fnd_user_pkg.CreateUserId(
1616: x_user_name,
1617: x_owner,
1618: x_unencrypted_password,
1619: x_session_number,

Line 1638: -- Insert new user record into FND_USER table.

1634:
1635: ----------------------------------------------------------------------
1636: --
1637: -- CreateUserParty (PUBLIC)
1638: -- Insert new user record into FND_USER table.
1639: -- If that user exists already, exception raised with the error message.
1640: -- There are three input arguments must be provided. All the other columns
1641: -- in FND_USER table can take the default value.
1642: --

Line 1641: -- in FND_USER table can take the default value.

1637: -- CreateUserParty (PUBLIC)
1638: -- Insert new user record into FND_USER table.
1639: -- If that user exists already, exception raised with the error message.
1640: -- There are three input arguments must be provided. All the other columns
1641: -- in FND_USER table can take the default value.
1642: --
1643: -- *** NOTE: This version accepts the new person_party_id foreign key
1644: -- to the "person". Use CreateUser to create a user with the old
1645: -- customer_id/employee_id keys.

Line 1671: dummy := fnd_user_pkg.CreateUserIdParty(

1667: x_person_party_id in number default null)
1668: is
1669: dummy number;
1670: begin
1671: dummy := fnd_user_pkg.CreateUserIdParty(
1672: x_user_name,
1673: x_owner,
1674: x_unencrypted_password,
1675: x_session_number,

Line 1701: -- begin fnd_user_pkg.updateuser('SCOTT', 'SEED', 'DRAGON'); end;

1697: -- keys foreign keys to the "person". Use UpdateUserParty to update
1698: -- a user with the new person_party_id key.
1699: --
1700: -- Usage Example in pl/sql
1701: -- begin fnd_user_pkg.updateuser('SCOTT', 'SEED', 'DRAGON'); end;
1702: --
1703: -- Mandatory Input Arguments
1704: -- x_user_name: An existing user name
1705: -- x_owner: 'SEED' or 'CUST'(customer)

Line 1763: -- begin fnd_user_pkg.updateuser('SCOTT', 'SEED', 'DRAGON'); end;

1759: -- to the "person". Use UpdateUser to update a user with the old
1760: -- customer_id/employee_id keys.
1761: --
1762: -- Usage Example in pl/sql
1763: -- begin fnd_user_pkg.updateuser('SCOTT', 'SEED', 'DRAGON'); end;
1764: --
1765: -- Mandatory Input Arguments
1766: -- x_user_name: An existing user name
1767: -- x_owner: 'SEED' or 'CUST'(customer)

Line 1852: from fnd_user u

1848: end if;
1849: begin
1850: select 'Y'
1851: into exists_flag
1852: from fnd_user u
1853: where u.user_name = x_user_name;
1854: exception
1855: when no_data_found then
1856: exists_flag := 'N';

Line 1860: fnd_user_pkg.UpdateUser(x_user_name,

1856: exists_flag := 'N';
1857: end;
1858:
1859: if (exists_flag = 'Y') then
1860: fnd_user_pkg.UpdateUser(x_user_name,
1861: x_owner,
1862: x_unencrypted_password,
1863: x_session_number,
1864: x_start_date,

Line 1887: fnd_user_pkg.createuser(x_user_name,

1883: fnd_log.string(FND_LOG.LEVEL_STATEMENT,
1884: c_log_head || l_api_name || '.call_creatuser',
1885: 'LoadUser(): calling CreateUser');
1886: end if;
1887: fnd_user_pkg.createuser(x_user_name,
1888: x_owner,
1889: x_unencrypted_password,
1890: x_session_number,
1891: x_start_date,

Line 1907: fnd_message.set_token('ROUTINE', 'FND_USER_PKG.LOADUSER');

1903: x_supplier_id);
1904: else
1905: fnd_message.set_name('FND', 'FND_NO_PASSWORD_PROVIDED');
1906: fnd_message.set_token('USER_NAME', X_USER_NAME);
1907: fnd_message.set_token('ROUTINE', 'FND_USER_PKG.LOADUSER');
1908: app_exception.raise_exception;
1909: end if;
1910: end if;
1911: end LoadUser;

Line 1952: from fnd_user u

1948: end if;
1949: begin
1950: select 'Y'
1951: into exists_flag
1952: from fnd_user u
1953: where u.user_name = x_user_name;
1954: exception
1955: when no_data_found then
1956: exists_flag := 'N';

Line 1960: fnd_user_pkg.UpdateUserParty(x_user_name,

1956: exists_flag := 'N';
1957: end;
1958:
1959: if (exists_flag = 'Y') then
1960: fnd_user_pkg.UpdateUserParty(x_user_name,
1961: x_owner,
1962: x_unencrypted_password,
1963: x_session_number,
1964: x_start_date,

Line 1985: fnd_user_pkg.createuserparty(x_user_name,

1981: fnd_log.string(FND_LOG.LEVEL_STATEMENT,
1982: c_log_head || l_api_name || '.call_creatuser',
1983: 'LoadUser(): calling CreateUser');
1984: end if;
1985: fnd_user_pkg.createuserparty(x_user_name,
1986: x_owner,
1987: x_unencrypted_password,
1988: x_session_number,
1989: x_start_date,

Line 2003: fnd_message.set_token('ROUTINE', 'FND_USER_PKG.LOADUSER');

1999: x_person_party_id);
2000: else
2001: fnd_message.set_name('FND', 'FND_NO_PASSWORD_PROVIDED');
2002: fnd_message.set_token('USER_NAME', X_USER_NAME);
2003: fnd_message.set_token('ROUTINE', 'FND_USER_PKG.LOADUSER');
2004: app_exception.raise_exception;
2005: end if;
2006: end if;
2007: end LoadUserParty;

Line 2017: -- begin fnd_user_pkg.disableuser('SCOTT'); end;

2013: -- You longer can log in as this user anymore. If username is not valid,
2014: -- exception raised with error message.
2015: --
2016: -- Usage example in pl/sql
2017: -- begin fnd_user_pkg.disableuser('SCOTT'); end;
2018: --
2019: -- Input (Mandatory)
2020: -- username: User Name
2021: --

Line 2029: fnd_user_pkg.UpdateUser(x_user_name => DisableUser.username,

2025: -- here we do not disable Guest account
2026: if( upper(username) = 'GUEST' ) then
2027: return;
2028: end if;
2029: fnd_user_pkg.UpdateUser(x_user_name => DisableUser.username,
2030: x_owner => null,
2031: x_end_date => sysdate);
2032: end DisableUser;
2033: ----------------------------------------------------------------------------

Line 2039: -- begin fnd_user_pkg.validatelogin('SCOTT', 'TIGER'); end;

2035: -- ValidateLogin (PUBLIC)
2036: -- Test if password is good for this given user.
2037: --
2038: -- Usage example in pl/sql
2039: -- begin fnd_user_pkg.validatelogin('SCOTT', 'TIGER'); end;
2040: --
2041: -- Input (Mandatory)
2042: -- username: User Name
2043: -- password: User Password

Line 2063: -- In all other cases use FND_USER_PKG.ValidateLogin.

2059: -- authentication against SSO (NON-UI business logic).
2060:
2061: -- Use the api for SSO user authentication. It is assumed that EBS is already
2062: -- configured with SSO.
2063: -- In all other cases use FND_USER_PKG.ValidateLogin.
2064: -- Product teams who are currently using this api:
2065: -- Oracle Mobile Field Service (FND_APPLICATION.APPLICATION_SHORT_NAME=CSM)
2066: -- (bug#14057306)
2067:

Line 2081: -- begin fnd_user_pkg.changepassword('SCOTT', 'WELCOME'); end;

2077: -- Set new password for a given user without having to provide
2078: -- the old password.
2079: --
2080: -- Usage example in pl/sql
2081: -- begin fnd_user_pkg.changepassword('SCOTT', 'WELCOME'); end;
2082: --
2083: -- Input (Mandatory)
2084: -- username: User Name
2085: -- newpassword New Password

Line 2099: -- begin fnd_user_pkg.changepassword('SCOTT', 'TIGER', 'WELCOME'); end;

2095: -- Set new password for a given user if the existing password needed to be
2096: -- validated before changing to the new password.
2097: --
2098: -- Usage example in pl/sql
2099: -- begin fnd_user_pkg.changepassword('SCOTT', 'TIGER', 'WELCOME'); end;
2100: --
2101: -- Input (Mandatory)
2102: -- username: User Name
2103: -- oldpassword Old Password

Line 2118: -- newly encrypted password. It does not set the password in FND_USER table.

2114: ----------------------------------------------------------------------------
2115: --
2116: -- GetReEncryptedPassword (PUBLIC)
2117: -- Return user password encrypted with new key. This just returns the
2118: -- newly encrypted password. It does not set the password in FND_USER table.
2119: --
2120: -- Usage example in pl/sql
2121: -- declare
2122: -- newpass varchar2(100);

Line 2124: -- newpass := fnd_user_pkg.getreencryptedpassword('SCOTT', 'NEWKEY'); end;

2120: -- Usage example in pl/sql
2121: -- declare
2122: -- newpass varchar2(100);
2123: -- begin
2124: -- newpass := fnd_user_pkg.getreencryptedpassword('SCOTT', 'NEWKEY'); end;
2125: -- end;
2126: --
2127: -- Input (Mandatory)
2128: -- username: User Name

Line 2140: -- This is to update column ENCRYPTED_USER_PASSWORD in table FND_USER

2136:
2137: ----------------------------------------------------------------------------
2138: -- SetReEncryptedPassword (PUBLIC)
2139: -- Set user password from value returned from GetReEncryptedPassword.
2140: -- This is to update column ENCRYPTED_USER_PASSWORD in table FND_USER
2141: --
2142: -- Usage example in pl/sql
2143: -- declare
2144: -- newpass varchar2(100);

Line 2146: -- newpass := fnd_user_pkg.getreencryptedpassword('SCOTT', 'NEWKEY'); end;

2142: -- Usage example in pl/sql
2143: -- declare
2144: -- newpass varchar2(100);
2145: -- begin
2146: -- newpass := fnd_user_pkg.getreencryptedpassword('SCOTT', 'NEWKEY'); end;
2147: -- fnd_user_pkg.setreencryptedpassword('SCOTT', newpass, 'NEWKEY'); end;
2148: -- end;
2149: --
2150: -- Input (Mandatory)

Line 2147: -- fnd_user_pkg.setreencryptedpassword('SCOTT', newpass, 'NEWKEY'); end;

2143: -- declare
2144: -- newpass varchar2(100);
2145: -- begin
2146: -- newpass := fnd_user_pkg.getreencryptedpassword('SCOTT', 'NEWKEY'); end;
2147: -- fnd_user_pkg.setreencryptedpassword('SCOTT', newpass, 'NEWKEY'); end;
2148: -- end;
2149: --
2150: -- Input (Mandatory)
2151: -- username: User Name

Line 2164: -- FND_USER.MergeCustomer() has been registered in Party Merge Data Dict.

2160: end;
2161: ----------------------------------------------------------------------------
2162: -- MergeCustomer (PUBLIC)
2163: -- This is the procedure being called during the Party Merge.
2164: -- FND_USER.MergeCustomer() has been registered in Party Merge Data Dict.
2165: -- The input/output arguments format matches the document PartyMergeDD.doc.
2166: -- The goal is to fix the customer id in fnd_user table to point to the
2167: -- same party when two similar parties are begin merged.
2168: --

Line 2166: -- The goal is to fix the customer id in fnd_user table to point to the

2162: -- MergeCustomer (PUBLIC)
2163: -- This is the procedure being called during the Party Merge.
2164: -- FND_USER.MergeCustomer() has been registered in Party Merge Data Dict.
2165: -- The input/output arguments format matches the document PartyMergeDD.doc.
2166: -- The goal is to fix the customer id in fnd_user table to point to the
2167: -- same party when two similar parties are begin merged.
2168: --
2169: -- Usage example in pl/sql
2170: -- This procedure should only be called from the PartyMerge utility.

Line 2186: update fnd_user

2182: p_return_status := FND_API.G_RET_STS_SUCCESS;
2183:
2184: if (p_from_fk_id <> p_to_fk_id) then
2185:
2186: update fnd_user
2187: set customer_id = p_to_fk_id
2188: where customer_id = p_from_fk_id;
2189:
2190: -- Added for Function Security Cache Invalidation

Line 2202: -- corresponding fnd_user as needed, if the user exists.

2198: --
2199: -- user_change - The rule function for FND's subscription on the
2200: -- oracle.apps.wf.entmgr.user.change event. This function
2201: -- retrieves the user's information and updates the
2202: -- corresponding fnd_user as needed, if the user exists.
2203: --
2204: FUNCTION user_change(p_subscription_guid in raw,
2205: p_event in out nocopy wf_event_t)
2206: return varchar2 is

Line 2236: from fnd_user

2232: nvl(email_address, '*NULL*'),
2233: nvl(fax, '*NULL*'),
2234: user_name,
2235: user_id
2236: from fnd_user
2237: where user_guid = userGuid;
2238:
2239: begin
2240:

Line 2272: fnd_user_pkg.disableUser(my_username);

2268: end if;
2269:
2270: if (my_mode = 'DELETE') then
2271: begin
2272: fnd_user_pkg.disableUser(my_username);
2273: exception
2274: when others then null;
2275: end;
2276:

Line 2290: from fnd_user

2286: nvl(email_address, '*NULL*'),
2287: nvl(fax, '*NULL*'),
2288: user_guid
2289: into old_desc, old_email, old_fax, old_guid
2290: from fnd_user
2291: where user_name = my_username;
2292: exception
2293: when others then return 'SUCCESS';
2294: end;

Line 2350: fnd_user_pkg.UpdateUser(

2346: end if;
2347: --End bug 3147423
2348: -- end of conversions --
2349:
2350: fnd_user_pkg.UpdateUser(
2351: x_user_name => my_username,
2352: x_owner => 'CUST',
2353: x_description => new_desc2,
2354: x_email_address => new_email2,

Line 2359: x_change_source => fnd_user_pkg.change_source_oid);

2355: x_fax => new_fax2,
2356: -- This api is called by LDAP so pass the change source so that we don't
2357: -- start the synch loop.
2358: x_user_guid => old_guid,
2359: x_change_source => fnd_user_pkg.change_source_oid);
2360:
2361: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
2362: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head || l_api_name,
2363: 'LDAP - finished fnd_user_pkg.UpdateUser('||my_username||')');

Line 2363: 'LDAP - finished fnd_user_pkg.UpdateUser('||my_username||')');

2359: x_change_source => fnd_user_pkg.change_source_oid);
2360:
2361: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
2362: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head || l_api_name,
2363: 'LDAP - finished fnd_user_pkg.UpdateUser('||my_username||')');
2364: end if;
2365: end if;
2366: end if;
2367:

Line 2406: fnd_user_pkg.disableUser(my_user);

2402: if ( (l_allow_sync = 'Y') and (l_local_login <> 'LOCAL') ) then
2403:
2404: if (p_event.GetValueForParameter('CHANGE_TYPE') = 'DELETE') then
2405: begin
2406: fnd_user_pkg.disableUser(my_user);
2407: exception
2408: when others then null;
2409: end;
2410:

Line 2419: -- treated as a "don't change". fnd_user_pkg apis do

2415: --
2416: -- NOTE: While we have the ability to distinguish between null
2417: -- and "known to be null", the standard apis do not.
2418: -- For now, we're must pass null regardless which is
2419: -- treated as a "don't change". fnd_user_pkg apis do
2420: -- not yet support the ability to "null out" an
2421: -- attribute value. Weak.
2422: --
2423: new_desc := wf_entity_mgr.get_attribute_value(my_ent_type, my_cachekey,

Line 2449: fnd_user_pkg.UpdateUser(

2445: if (new_email in ('*NULL*', '*UNKNOWN*')) then
2446: new_email := null_char;
2447: end if;
2448:
2449: fnd_user_pkg.UpdateUser(
2450: x_user_name => my_user,
2451: x_owner => 'CUST',
2452: x_description => new_desc,
2453: x_email_address => new_email,

Line 2458: 'OID - finished fnd_user_pkg.UpdateUser('||my_user||')');

2454: x_fax => new_fax);
2455:
2456: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
2457: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head || l_api_name,
2458: 'OID - finished fnd_user_pkg.UpdateUser('||my_user||')');
2459: end if;
2460: end if;
2461: end if;
2462: else

Line 2481: -- corresponding fnd_user if the user does not already exist.

2477: --
2478: -- user_create_rf - The rule function for FND's 2nd subscription on the
2479: -- oracle.apps.wf.entmgr.user.change event. This function
2480: -- retrieves the user's information and creates the
2481: -- corresponding fnd_user if the user does not already exist.
2482: --
2483: FUNCTION user_create_rf(p_subscription_guid in raw,
2484: p_event in out nocopy wf_event_t)
2485: return varchar2

Line 2528: from fnd_user

2524: end if;
2525:
2526: begin
2527: select 'Y' into existing_user
2528: from fnd_user
2529: where user_name = my_username;
2530:
2531: return 'SUCCESS';
2532: exception

Line 2580: fnd_user_pkg.CreateUser(

2576: --End Bug 3147423
2577:
2578: -- end of conversions --
2579:
2580: fnd_user_pkg.CreateUser(
2581: x_user_name => my_username,
2582: x_owner => 'CUST',
2583: x_unencrypted_password => null,
2584: x_description => new_desc2,

Line 2590: 'LDAP - finished fnd_user_pkg.CreateUser('||my_username||')');

2586: x_fax => new_fax2);
2587:
2588: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
2589: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head || l_api_name,
2590: 'LDAP - finished fnd_user_pkg.CreateUser('||my_username||')');
2591: end if;
2592: end;
2593:
2594: -- If CHANGE_SOURCE is OID, it means it's raised from two-way sync code.

Line 2611: from fnd_user

2607: 'OID - guid ='||new_guid);
2608: end if;
2609: begin
2610: select 'Y' into existing_user
2611: from fnd_user
2612: where user_name = my_cachekey;
2613:
2614: return 'SUCCESS';
2615:

Line 2637: fnd_user_pkg.CreateUser(

2633: if (new_email in ('*NULL*', '*UNKNOWN*')) then
2634: new_email := null;
2635: end if;
2636:
2637: fnd_user_pkg.CreateUser(
2638: x_user_name => my_cachekey,
2639: x_owner => 'CUST',
2640: x_unencrypted_password => null,
2641: x_description => new_desc,

Line 2647: 'OID - finished fnd_user_pkg.CreateUser('||my_cachekey||')');

2643: x_fax => new_fax);
2644:
2645: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
2646: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head || l_api_name,
2647: 'OID - finished fnd_user_pkg.CreateUser('||my_cachekey||')');
2648: end if;
2649:
2650: --
2651: -- guid will eventually be managed centrally so didn't want to add it

Line 2652: -- to the fnd_user_pkg apis...hence the separate update here

2648: end if;
2649:
2650: --
2651: -- guid will eventually be managed centrally so didn't want to add it
2652: -- to the fnd_user_pkg apis...hence the separate update here
2653: --
2654: update fnd_user set user_guid = new_guid
2655: where user_name = my_cachekey;
2656:

Line 2654: update fnd_user set user_guid = new_guid

2650: --
2651: -- guid will eventually be managed centrally so didn't want to add it
2652: -- to the fnd_user_pkg apis...hence the separate update here
2653: --
2654: update fnd_user set user_guid = new_guid
2655: where user_name = my_cachekey;
2656:
2657: end;
2658: end if;

Line 2694: ret := fnd_dictionary_pkg.updatepkcolumns('FND', 'FND_USER', colnames, colold,

2690: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
2691: fnd_log.string(FND_LOG.LEVEL_STATEMENT, C_LOG_HEAD || l_api_name || '.',
2692: tmpbuf);
2693: end if;
2694: ret := fnd_dictionary_pkg.updatepkcolumns('FND', 'FND_USER', colnames, colold,
2695: colnew);
2696: tmpbuf := 'Finished fnd_dictionary_pkg.updatepkcolumns';
2697: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
2698: fnd_log.string(FND_LOG.LEVEL_STATEMENT, C_LOG_HEAD || l_api_name || '.',

Line 2760: from fnd_user

2756: to_char(start_date, 'YYYYMMDDHH24MISS'),
2757: to_char(end_date, 'YYYYMMDDHH24MISS')
2758: into my_userid, my_email, my_desc, my_fax, my_empid, my_partyid,
2759: my_start, my_exp, my_guid, my_pwd, ch_start, ch_exp
2760: from fnd_user
2761: where user_name = upper(p_user_name);
2762:
2763: -- construct attribute list for wf synch --
2764: -- unstubbed the code

Line 2808: from Forms or from the fnd_user_pkg.change_user_name PL/SQL api */

2804:
2805: -- begin bug 2504562
2806: wf_event.AddParameterToList('OLD_USER_NAME', g_old_user_name, mylist);
2807: /* set g_old_user_name to null here to cover calls to user_synch initiated
2808: from Forms or from the fnd_user_pkg.change_user_name PL/SQL api */
2809: --Comment out this following call because I need it to do the pk children
2810: --later. After pk children update, then I will reset g_old_user_name.
2811: --dummy := fnd_user_pkg.set_old_user_name(NULL);
2812: -- end bug 2504562

Line 2811: --dummy := fnd_user_pkg.set_old_user_name(NULL);

2807: /* set g_old_user_name to null here to cover calls to user_synch initiated
2808: from Forms or from the fnd_user_pkg.change_user_name PL/SQL api */
2809: --Comment out this following call because I need it to do the pk children
2810: --later. After pk children update, then I will reset g_old_user_name.
2811: --dummy := fnd_user_pkg.set_old_user_name(NULL);
2812: -- end bug 2504562
2813:
2814: --
2815: -- Added calls for the lang/territory and notification preference.

Line 2906: -- from Forms or from the fnd_user_pkg.change_user_name PL/SQL api

2902: if (g_old_user_name is not null) then
2903: UpdateUsernameChildren(g_old_user_name, p_user_name);
2904: end if;
2905: -- set g_old_user_name to null here to cover calls to user_synch initiated
2906: -- from Forms or from the fnd_user_pkg.change_user_name PL/SQL api
2907: dummy := fnd_user_pkg.set_old_user_name(NULL);
2908: dummy := fnd_user_pkg.set_old_person_party_id(NULL);
2909: dummy := fnd_user_pkg.set_old_user_guid(NULL);
2910:

Line 2907: dummy := fnd_user_pkg.set_old_user_name(NULL);

2903: UpdateUsernameChildren(g_old_user_name, p_user_name);
2904: end if;
2905: -- set g_old_user_name to null here to cover calls to user_synch initiated
2906: -- from Forms or from the fnd_user_pkg.change_user_name PL/SQL api
2907: dummy := fnd_user_pkg.set_old_user_name(NULL);
2908: dummy := fnd_user_pkg.set_old_person_party_id(NULL);
2909: dummy := fnd_user_pkg.set_old_user_guid(NULL);
2910:
2911: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then

Line 2908: dummy := fnd_user_pkg.set_old_person_party_id(NULL);

2904: end if;
2905: -- set g_old_user_name to null here to cover calls to user_synch initiated
2906: -- from Forms or from the fnd_user_pkg.change_user_name PL/SQL api
2907: dummy := fnd_user_pkg.set_old_user_name(NULL);
2908: dummy := fnd_user_pkg.set_old_person_party_id(NULL);
2909: dummy := fnd_user_pkg.set_old_user_guid(NULL);
2910:
2911: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
2912: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head || l_api_name,

Line 2909: dummy := fnd_user_pkg.set_old_user_guid(NULL);

2905: -- set g_old_user_name to null here to cover calls to user_synch initiated
2906: -- from Forms or from the fnd_user_pkg.change_user_name PL/SQL api
2907: dummy := fnd_user_pkg.set_old_user_name(NULL);
2908: dummy := fnd_user_pkg.set_old_person_party_id(NULL);
2909: dummy := fnd_user_pkg.set_old_user_guid(NULL);
2910:
2911: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
2912: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head || l_api_name,
2913: 'End user_synch');

Line 2917: -- that fnd_user_pkg.user_synch() was passed an invalid or null user_name,

2913: 'End user_synch');
2914: end if;
2915: exception
2916: -- Bug 3617474: This NO_DATA_FOUND exception handler was placed in the event
2917: -- that fnd_user_pkg.user_synch() was passed an invalid or null user_name,
2918: -- i.e a user_name that does not exist in fnd_user.
2919: when NO_DATA_FOUND then
2920: null;
2921:

Line 2918: -- i.e a user_name that does not exist in fnd_user.

2914: end if;
2915: exception
2916: -- Bug 3617474: This NO_DATA_FOUND exception handler was placed in the event
2917: -- that fnd_user_pkg.user_synch() was passed an invalid or null user_name,
2918: -- i.e a user_name that does not exist in fnd_user.
2919: when NO_DATA_FOUND then
2920: null;
2921:
2922: end user_synch;

Line 2932: -- begin fnd_user_pkg.delresp('SCOTT', 'FND', 'APPLICATION_DEVELOPER',

2928: -- If any of the username or application short name or responsibility key or
2929: -- security group is not valid, exception raised with error message.
2930: --
2931: -- Usage example in pl/sql
2932: -- begin fnd_user_pkg.delresp('SCOTT', 'FND', 'APPLICATION_DEVELOPER',
2933: -- 'STANDARD'); end;
2934: -- Input (Mandatory)
2935: -- username: User Name
2936: -- resp_app: Application Short Name

Line 2952: from fnd_user

2948: startdate date;
2949: begin
2950: begin
2951: select user_id into userid
2952: from fnd_user
2953: where user_name = DelResp.username;
2954:
2955: select application_id into appid
2956: from fnd_application

Line 2960: /* sysdate in call to fnd_user_resp_groups_api.update_assignment */

2956: from fnd_application
2957: where application_short_name = DelResp.Resp_app;
2958:
2959: /* Bug4600645 - Modified to get actual start_date instead of using */
2960: /* sysdate in call to fnd_user_resp_groups_api.update_assignment */
2961:
2962: select responsibility_id
2963: into respid
2964: from fnd_responsibility

Line 2975: from fnd_user_resp_groups_all

2971:
2972: /*Bug4600645 - Get actual start_date value*/
2973:
2974: select start_date into startdate
2975: from fnd_user_resp_groups_all
2976: where user_id = userid
2977: and responsibility_id = respid
2978: and responsibility_application_id = appid;
2979:

Line 2990: if (fnd_user_resp_groups_api.assignment_exists(

2986: fnd_message.set_token('SECURITY_GROUP', security_group);
2987: app_exception.raise_exception;
2988: end;
2989:
2990: if (fnd_user_resp_groups_api.assignment_exists(
2991: userid, respid, appid, secid)) then
2992: fnd_user_resp_groups_api.update_assignment(
2993: user_id => userid,
2994: responsibility_id => respid,

Line 2992: fnd_user_resp_groups_api.update_assignment(

2988: end;
2989:
2990: if (fnd_user_resp_groups_api.assignment_exists(
2991: userid, respid, appid, secid)) then
2992: fnd_user_resp_groups_api.update_assignment(
2993: user_id => userid,
2994: responsibility_id => respid,
2995: responsibility_application_id => appid,
2996: security_group_id => secid,

Line 3011: -- begin fnd_user_pkg.addresp('SCOTT', 'FND', 'APPLICATION_DEVELOPER',

3007: -- If user name or application short name or responsbility key name
3008: -- or security group key is not valid, exception raised with error message.
3009: --
3010: -- Usage example in pl/sql
3011: -- begin fnd_user_pkg.addresp('SCOTT', 'FND', 'APPLICATION_DEVELOPER',
3012: -- 'STANDARD', 'DESCRIPTION', sysdate, null); end;
3013: -- Input (Mandatory)
3014: -- username: User Name
3015: -- resp_app: Application Short Name

Line 3037: from fnd_user

3033: begin
3034:
3035: begin
3036: select user_id into userid
3037: from fnd_user
3038: where user_name = AddResp.username;
3039:
3040: select application_id into appid
3041: from fnd_application

Line 3063: if (fnd_user_resp_groups_api.assignment_exists(

3059: fnd_message.set_token('SECURITY_GROUP', security_group);
3060: app_exception.raise_exception;
3061: end;
3062:
3063: if (fnd_user_resp_groups_api.assignment_exists(
3064: userid, respid, appid, secid)) then
3065: fnd_user_resp_groups_api.update_assignment(
3066: user_id => userid,
3067: responsibility_id => respid,

Line 3065: fnd_user_resp_groups_api.update_assignment(

3061: end;
3062:
3063: if (fnd_user_resp_groups_api.assignment_exists(
3064: userid, respid, appid, secid)) then
3065: fnd_user_resp_groups_api.update_assignment(
3066: user_id => userid,
3067: responsibility_id => respid,
3068: responsibility_application_id => appid,
3069: security_group_id => secid,

Line 3074: fnd_user_resp_groups_api.insert_assignment(

3070: start_date => AddResp.start_date,
3071: end_date => AddResp.end_date,
3072: description => AddResp.description);
3073: else
3074: fnd_user_resp_groups_api.insert_assignment(
3075: user_id => userid,
3076: responsibility_id => respid,
3077: responsibility_application_id => appid,
3078: security_group_id => secid,

Line 3100: -- Description: Calls FND_USER_PKG.UpdateUser

3096: end isPasswordChangeable;
3097:
3098: -------------------------------------------------------------------
3099: -- Name: UpdatePassword_WF
3100: -- Description: Calls FND_USER_PKG.UpdateUser
3101: -------------------------------------------------------------------
3102: Procedure UpdatePassword_WF(itemtype in varchar2,
3103: itemkey in varchar2,
3104: actid in number,

Line 3111: FND_USER_PKG.UpdateUser(

3107:
3108: begin
3109:
3110: if (funcmode = 'RUN') then
3111: FND_USER_PKG.UpdateUser(
3112: x_user_name=>
3113: WF_ENGINE.GetActivityAttrText(itemtype, itemkey, actid,
3114: 'X_USER_NAME'),
3115: x_owner=>'CUST',

Line 3494: -- begin fnd_user_pkg.enableuser('SCOTT'); end;

3490: -- You can log in as this user from now.
3491: -- If username is not valid, exception raised with error message.
3492: --
3493: -- Usage example in pl/sql
3494: -- begin fnd_user_pkg.enableuser('SCOTT'); end;
3495: -- begin fnd_user_pkg.enableuser('SCOTT', sysdate+1, sysdate+30); end;
3496: --
3497: -- Input (Mandatory)
3498: -- username: User Name

Line 3495: -- begin fnd_user_pkg.enableuser('SCOTT', sysdate+1, sysdate+30); end;

3491: -- If username is not valid, exception raised with error message.
3492: --
3493: -- Usage example in pl/sql
3494: -- begin fnd_user_pkg.enableuser('SCOTT'); end;
3495: -- begin fnd_user_pkg.enableuser('SCOTT', sysdate+1, sysdate+30); end;
3496: --
3497: -- Input (Mandatory)
3498: -- username: User Name
3499: -- Input (Non-Mandatory)

Line 3505: end_date date default fnd_user_pkg.null_date) is

3501: -- end_date: End Date
3502: --
3503: procedure EnableUser(username varchar2,
3504: start_date date default sysdate,
3505: end_date date default fnd_user_pkg.null_date) is
3506: begin
3507: fnd_user_pkg.UpdateUser(x_user_name => EnableUser.username,
3508: x_owner => NULL,
3509: x_start_date => EnableUser.start_date,

Line 3507: fnd_user_pkg.UpdateUser(x_user_name => EnableUser.username,

3503: procedure EnableUser(username varchar2,
3504: start_date date default sysdate,
3505: end_date date default fnd_user_pkg.null_date) is
3506: begin
3507: fnd_user_pkg.UpdateUser(x_user_name => EnableUser.username,
3508: x_owner => NULL,
3509: x_start_date => EnableUser.start_date,
3510: x_end_date => EnableUser.end_date);
3511: end EnableUser;

Line 3524: -- begin fnd_user_pkg.creatependinguser('SCOTT', 'SEED', 'welcome'); end;

3520: -- UMX with an aproval process.
3521: --
3522: --
3523: -- Usage example in pl/sql
3524: -- begin fnd_user_pkg.creatependinguser('SCOTT', 'SEED', 'welcome'); end;
3525: -- begin fnd_user_pkg.creatependinguser('SCOTT', 'SEED'); end;
3526: --
3527: -- Input (Mandatory)
3528: -- x_user_name: User Name

Line 3525: -- begin fnd_user_pkg.creatependinguser('SCOTT', 'SEED'); end;

3521: --
3522: --
3523: -- Usage example in pl/sql
3524: -- begin fnd_user_pkg.creatependinguser('SCOTT', 'SEED', 'welcome'); end;
3525: -- begin fnd_user_pkg.creatependinguser('SCOTT', 'SEED'); end;
3526: --
3527: -- Input (Mandatory)
3528: -- x_user_name: User Name
3529: -- x_owner: 'SEED' or 'CUST'(customer)

Line 3547: uid := fnd_user_pkg.CreateUserIdParty(

3543: x_person_party_id in number default null) return number
3544: is
3545: uid number;
3546: begin
3547: uid := fnd_user_pkg.CreateUserIdParty(
3548: x_user_name,
3549: x_owner,
3550: x_unencrypted_password,
3551: x_session_number,

Line 3572: -- Delete this user from fnd_user table only if this is a pending user.

3568:
3569: ----------------------------------------------------------------------------
3570: --
3571: -- RemovePendingUser (PUBLIC)
3572: -- Delete this user from fnd_user table only if this is a pending user.
3573: -- If this is not a valid username or is not a pending user, raise error.
3574: -- Pending user is created when a user registers a user account through
3575: -- UMX with an aproval process.
3576: --

Line 3578: -- begin fnd_user_pkg.removependinguser('SCOTT'); end;

3574: -- Pending user is created when a user registers a user account through
3575: -- UMX with an aproval process.
3576: --
3577: -- Usage example in pl/sql
3578: -- begin fnd_user_pkg.removependinguser('SCOTT'); end;
3579: --
3580: -- Input (Mandatory)
3581: -- username: User Name
3582: --

Line 3601: from fnd_user

3597: -- RSHEH: Need to have exception trapping for no_data_found exception
3598: begin
3599: select user_id, user_guid
3600: into l_user_id, l_user_guid
3601: from fnd_user
3602: where user_name = upper(username)
3603: and to_char(start_date) = to_char(FND_API.G_MISS_DATE)
3604: and to_char(end_date) = to_char(FND_API.G_MISS_DATE);
3605:

Line 3640: 'Delete pending FND user');

3636:
3637: -- Only allow to delete a PENDING user
3638: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
3639: fnd_log.string(FND_LOG.LEVEL_STATEMENT, C_LOG_HEAD || l_api_name,
3640: 'Delete pending FND user');
3641: end if;
3642:
3643: delete from fnd_user
3644: where user_name = upper(username)

Line 3643: delete from fnd_user

3639: fnd_log.string(FND_LOG.LEVEL_STATEMENT, C_LOG_HEAD || l_api_name,
3640: 'Delete pending FND user');
3641: end if;
3642:
3643: delete from fnd_user
3644: where user_name = upper(username)
3645: and to_char(start_date) = to_char(FND_API.G_MISS_DATE)
3646: and to_char(end_date) = to_char(FND_API.G_MISS_DATE);
3647:

Line 3685: -- begin fnd_user_pkg.assignpartytouser('SCOTT', 1001); end;

3681: -- AssignPartyToUser (PUBLIC)
3682: -- Assign a TCA party to a given user
3683: --
3684: -- Usage example in pl/sql
3685: -- begin fnd_user_pkg.assignpartytouser('SCOTT', 1001); end;
3686: --
3687: -- Input (Mandatory)
3688: -- x_user_name: User Name
3689: -- x_party_id: Party Name Id

Line 3713: fnd_user_pkg.UpdateUserParty(x_user_name => x_user_name,

3709: fnd_message.set_token('PARTY_NAME', x_party);
3710: app_exception.raise_exception;
3711: end;
3712:
3713: fnd_user_pkg.UpdateUserParty(x_user_name => x_user_name,
3714: x_owner => 'SEED',
3715: x_person_party_id => pid);
3716: */
3717:

Line 3718: fnd_user_pkg.UpdateUserParty(x_user_name => x_user_name,

3714: x_owner => 'SEED',
3715: x_person_party_id => pid);
3716: */
3717:
3718: fnd_user_pkg.UpdateUserParty(x_user_name => x_user_name,
3719: x_owner => 'SEED',
3720: x_person_party_id => x_party_id);
3721:
3722: end AssignPartyToUser;

Line 3760: -- begin fnd_user_pkg.change_user_name('SOCTT', 'SCOTT'); end;

3756: -- This api changes username, deals with encryption changes and
3757: -- update foreign keys that were using the old username.
3758: --
3759: -- Usage example in pl/sql
3760: -- begin fnd_user_pkg.change_user_name('SOCTT', 'SCOTT'); end;
3761: --
3762: -- Input (Mandantory)
3763: -- x_old_user_name: Old User Name
3764: -- x_new_user_name: New User Name

Line 3787: -- ensure x_old_user_name exists in fnd_user before we proceed

3783: fnd_message.set_name('FND', 'SECURITY-GUEST USERNAME');
3784: app_exception.raise_exception;
3785: end if;
3786:
3787: -- ensure x_old_user_name exists in fnd_user before we proceed
3788: select USER_GUID, encrypted_user_password
3789: into l_user_guid, encpwd
3790: from fnd_user
3791: where user_name = upper(x_old_user_name);

Line 3790: from fnd_user

3786:
3787: -- ensure x_old_user_name exists in fnd_user before we proceed
3788: select USER_GUID, encrypted_user_password
3789: into l_user_guid, encpwd
3790: from fnd_user
3791: where user_name = upper(x_old_user_name);
3792:
3793: begin
3794: -- ensure x_new_user_name doesn't already exist in fnd_user

Line 3794: -- ensure x_new_user_name doesn't already exist in fnd_user

3790: from fnd_user
3791: where user_name = upper(x_old_user_name);
3792:
3793: begin
3794: -- ensure x_new_user_name doesn't already exist in fnd_user
3795: select null into dummy from fnd_user
3796: where user_name = upper(x_new_user_name);
3797: fnd_message.set_name('FND', 'SECURITY-DUPLICATE USER');
3798: app_exception.raise_exception;

Line 3795: select null into dummy from fnd_user

3791: where user_name = upper(x_old_user_name);
3792:
3793: begin
3794: -- ensure x_new_user_name doesn't already exist in fnd_user
3795: select null into dummy from fnd_user
3796: where user_name = upper(x_new_user_name);
3797: fnd_message.set_name('FND', 'SECURITY-DUPLICATE USER');
3798: app_exception.raise_exception;
3799: exception

Line 3807: -- Move ldap_wrapper synch call to here before we do FND user update

3803:
3804: -- Start bug 5866089 just adding the following if check
3805: if (x_change_source is null) then
3806: -- Start bug 4625235
3807: -- Move ldap_wrapper synch call to here before we do FND user update
3808: begin
3809: tmpbuf := 'Calling ldap_wrapper_change_user_name to change '||
3810: x_old_user_name|| ' to '|| x_new_user_name;
3811: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then

Line 3832: update fnd_user set user_name = upper(x_new_user_name)

3828: -- capture x_old_user_name in package variable g_old_user_name
3829: g_old_user_name := upper(x_old_user_name);
3830:
3831: -- change old username to new username
3832: update fnd_user set user_name = upper(x_new_user_name)
3833: where user_name = upper(x_old_user_name);
3834:
3835: -- This code was moved before updating FND_USER due to a change in
3836: -- FND_WEB_SEC.change_password having an autonomous transaction pragma.

Line 3835: -- This code was moved before updating FND_USER due to a change in

3831: -- change old username to new username
3832: update fnd_user set user_name = upper(x_new_user_name)
3833: where user_name = upper(x_old_user_name);
3834:
3835: -- This code was moved before updating FND_USER due to a change in
3836: -- FND_WEB_SEC.change_password having an autonomous transaction pragma.
3837: -- Password changes failed due to said change. See bug 2426407.
3838: -- handle password encryption with new username
3839: tmpbuf := 'Recrypting '||x_new_user_name|| ' password';

Line 3847: newpass := fnd_user_pkg.GetReEncryptedPassword(x_new_user_name, 'NEWKEY');

3843: end if;
3844:
3845: -- Only have to do password reencryption if is not EXTERNAL, INVALID or Hash mode
3846: if ( (encpwd not in ('EXTERNAL', 'INVALID')) and (substr(encpwd, 1, 1) <> 'X') ) then
3847: newpass := fnd_user_pkg.GetReEncryptedPassword(x_new_user_name, 'NEWKEY');
3848: ret := fnd_user_pkg.SetReEncryptedPassword(x_new_user_name,newpass,'NEWKEY');
3849: end if;
3850:
3851: tmpbuf := 'updating fnd_user for new user_name '||x_new_user_name;

Line 3848: ret := fnd_user_pkg.SetReEncryptedPassword(x_new_user_name,newpass,'NEWKEY');

3844:
3845: -- Only have to do password reencryption if is not EXTERNAL, INVALID or Hash mode
3846: if ( (encpwd not in ('EXTERNAL', 'INVALID')) and (substr(encpwd, 1, 1) <> 'X') ) then
3847: newpass := fnd_user_pkg.GetReEncryptedPassword(x_new_user_name, 'NEWKEY');
3848: ret := fnd_user_pkg.SetReEncryptedPassword(x_new_user_name,newpass,'NEWKEY');
3849: end if;
3850:
3851: tmpbuf := 'updating fnd_user for new user_name '||x_new_user_name;
3852: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then

Line 3851: tmpbuf := 'updating fnd_user for new user_name '||x_new_user_name;

3847: newpass := fnd_user_pkg.GetReEncryptedPassword(x_new_user_name, 'NEWKEY');
3848: ret := fnd_user_pkg.SetReEncryptedPassword(x_new_user_name,newpass,'NEWKEY');
3849: end if;
3850:
3851: tmpbuf := 'updating fnd_user for new user_name '||x_new_user_name;
3852: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
3853: fnd_log.string(FND_LOG.LEVEL_STATEMENT, C_LOG_HEAD || l_api_name || '.',
3854: tmpbuf);
3855: end if;

Line 3864: from fnd_user

3860: -- is stored) exception and returns FND_CHANGE_USER_FAILED error.
3861: -- Added for Function Security Cache Invalidation
3862: select user_id
3863: into l_user_id
3864: from fnd_user
3865: where user_name = upper(x_new_user_name);
3866:
3867: fnd_function_security_cache.update_user(l_user_id);
3868:

Line 3870: tmpbuf := 'Start calling fnd_user_pkg.user_synch('||x_new_user_name||')';

3866:
3867: fnd_function_security_cache.update_user(l_user_id);
3868:
3869: -- propagate username change to WF and entity mgr
3870: tmpbuf := 'Start calling fnd_user_pkg.user_synch('||x_new_user_name||')';
3871: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
3872: fnd_log.string(FND_LOG.LEVEL_STATEMENT, C_LOG_HEAD || l_api_name || '.',
3873: tmpbuf);
3874: end if;

Line 3876: fnd_user_pkg.user_synch(upper(x_new_user_name));

3872: fnd_log.string(FND_LOG.LEVEL_STATEMENT, C_LOG_HEAD || l_api_name || '.',
3873: tmpbuf);
3874: end if;
3875: begin
3876: fnd_user_pkg.user_synch(upper(x_new_user_name));
3877: exception
3878: when others then
3879: reason := fnd_message.get;
3880: fnd_message.set_name('FND', 'FND_FAILED_WF_USER_SYNCH');

Line 3896: tmpbuf := 'Finished fnd_user_pkg.user_synch';

3892: set grantee_key = x_new_user_name
3893: where grantee_key = x_old_user_name
3894: and grantee_type = 'USER';
3895:
3896: tmpbuf := 'Finished fnd_user_pkg.user_synch';
3897: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
3898: fnd_log.string(FND_LOG.LEVEL_STATEMENT, C_LOG_HEAD || l_api_name || '.',
3899: tmpbuf);
3900: end if;

Line 3927: -- old username does not exist in fnd_user

3923: end;
3924:
3925: exception
3926: when no_data_found then
3927: -- old username does not exist in fnd_user
3928: fnd_message.set_name('FND', 'FND_CHANGE_USER_FAILED');
3929: fnd_message.set_token('USER_NAME', x_old_user_name);
3930: app_exception.raise_exception;
3931:

Line 3946: -- begin retval := fnd_user_pkg.set_old_user_name('SOCTT'); end;

3942: --
3943: -- Usage example in pl/sql
3944: -- declare
3945: -- retval number := null;
3946: -- begin retval := fnd_user_pkg.set_old_user_name('SOCTT'); end;
3947: --
3948: -- Input (Mandantory)
3949: -- x_old_user_name: Old User Name
3950: --

Line 3968: -- FND_USER.MergePartyId() has been registered in Party Merge Data Dict.

3964:
3965: ----------------------------------------------------------------------------
3966: -- MergePartyId (PUBLIC)
3967: -- This is the procedure being called during the Party Merge.
3968: -- FND_USER.MergePartyId() has been registered in Party Merge Data Dict.
3969: -- The input/output arguments format matches the document PartyMergeDD.doc.
3970: -- The goal is to fix the person_party_id in fnd_user table to point to the
3971: -- same party when two similar parties are begin merged.
3972: --

Line 3970: -- The goal is to fix the person_party_id in fnd_user table to point to the

3966: -- MergePartyId (PUBLIC)
3967: -- This is the procedure being called during the Party Merge.
3968: -- FND_USER.MergePartyId() has been registered in Party Merge Data Dict.
3969: -- The input/output arguments format matches the document PartyMergeDD.doc.
3970: -- The goal is to fix the person_party_id in fnd_user table to point to the
3971: -- same party when two similar parties are begin merged.
3972: --
3973: -- Usage example in pl/sql
3974: -- This procedure should only be called from the PartyMerge utility.

Line 3990: update fnd_user

3986: p_return_status := FND_API.G_RET_STS_SUCCESS;
3987:
3988: if (p_from_fk_id <> p_to_fk_id) then
3989:
3990: update fnd_user
3991: set person_party_id = p_to_fk_id
3992: where person_party_id = p_from_fk_id;
3993:
3994: -- Added for Function Security Cache Invalidation

Line 4040: wf_event.raise(p_event_name => 'oracle.apps.fnd.user.name.validate',

4036: else
4037: -- we pass the generic validation, it is time to call any
4038: -- customized user name validation if there is any.
4039: begin
4040: wf_event.raise(p_event_name => 'oracle.apps.fnd.user.name.validate',
4041: p_event_key => x_user_name,
4042: p_event_data => NULL,
4043: p_parameters => NULL,
4044: p_send_date => Sysdate);

Line 4063: -- Bug#3904339 - SSO: Add user_guid parameter in fnd_user_pkg apis

4059:
4060: --
4061: -- CreateUser (PUBLIC)
4062: --
4063: -- Bug#3904339 - SSO: Add user_guid parameter in fnd_user_pkg apis
4064: -- Overloaded procedure to create user
4065: -- Accepts User GUID as a parameter in addition to the other parameters
4066: --
4067: --

Line 4091: l_result := fnd_user_pkg.CreateUserId(

4087: x_change_source in number default null)
4088: is
4089: l_result number;
4090: begin
4091: l_result := fnd_user_pkg.CreateUserId(
4092: x_user_name,
4093: x_owner,
4094: x_unencrypted_password,
4095: x_session_number,

Line 4117: -- Bug#3904339 - SSO: Add user_guid parameter in fnd_user_pkg apis

4113: ----------------------------------------------------------------------
4114: --
4115: -- CreateUserId (PUBLIC)
4116: --
4117: -- Bug#3904339 - SSO: Add user_guid parameter in fnd_user_pkg apis
4118: -- Overloaded procedure to create user
4119: -- Accepts User GUID as a parameter in addition to the other parameters
4120: --
4121: -- Returns

Line 4175: -- Bug#3904339 - SSO: Add user_guid parameter in fnd_user_pkg apis

4171: ----------------------------------------------------------------------
4172: --
4173: -- UpdateUser (Public)
4174: --
4175: -- Bug#3904339 - SSO: Add user_guid parameter in fnd_user_pkg apis
4176: -- Overloaded procedure to update user
4177: -- Accepts User GUID as a parameter in addition to the other parameters
4178: --
4179: procedure UpdateUser (

Line 4237: select 1 into dummy from fnd_user

4233:
4234: function userExists(x_user_name in varchar2) return boolean is
4235: dummy number;
4236: begin
4237: select 1 into dummy from fnd_user
4238: where user_name = upper(x_user_name);
4239: return TRUE;
4240: exception
4241: when no_data_found then

Line 4253: -- begin ret := fnd_user_pkg.testusername('SOCTT'); end;

4249: -- This api test whether a username exists in FND and/or in OID.
4250: --
4251: -- Usage example in pl/sql
4252: -- declare ret number;
4253: -- begin ret := fnd_user_pkg.testusername('SOCTT'); end;
4254: --
4255: -- Input (Mandantory)
4256: -- x_user_name: User Name that you want to test
4257: --

Line 4274: fnd_user_pkg.validate_user_name(x_user_name);

4270:
4271: pf := 'N';
4272:
4273: begin
4274: fnd_user_pkg.validate_user_name(x_user_name);
4275: exception
4276: when others then
4277: -- error message is already on the stack from validate_user_name()
4278: -- Either a generic validation error message or specific message from

Line 4279: -- the subscriber of "fnd.user.name.validate"

4275: exception
4276: when others then
4277: -- error message is already on the stack from validate_user_name()
4278: -- Either a generic validation error message or specific message from
4279: -- the subscriber of "fnd.user.name.validate"
4280: return(USER_INVALID_NAME);
4281: end;
4282:
4283: if (fnd_user_pkg.userExists(x_user_name)) then

Line 4283: if (fnd_user_pkg.userExists(x_user_name)) then

4279: -- the subscriber of "fnd.user.name.validate"
4280: return(USER_INVALID_NAME);
4281: end;
4282:
4283: if (fnd_user_pkg.userExists(x_user_name)) then
4284: fnd_message.set_name('FND', 'FND_USER_EXISTS_IN_FND');
4285: return(USER_EXISTS_IN_FND);
4286: else
4287: begin

Line 4284: fnd_message.set_name('FND', 'FND_USER_EXISTS_IN_FND');

4280: return(USER_INVALID_NAME);
4281: end;
4282:
4283: if (fnd_user_pkg.userExists(x_user_name)) then
4284: fnd_message.set_name('FND', 'FND_USER_EXISTS_IN_FND');
4285: return(USER_EXISTS_IN_FND);
4286: else
4287: begin
4288: retval := fnd_ldap_wrapper.user_exists(x_user_name);

Line 4299: fnd_message.set_name('FND', 'FND_USER_SYNCHED');

4295: -- The above check return that user exists in oid.
4296: fnd_profile.get('APPS_SSO_LINK_SAME_NAMES', pf);
4297:
4298: if(pf = 'Y') then
4299: fnd_message.set_name('FND', 'FND_USER_SYNCHED');
4300: fnd_message.set_token('USER_NAME', x_user_name);
4301: return(USER_SYNCHED);
4302: -- next time when this user gets created in fnd, it will be
4303: -- linked to each other.

Line 4305: fnd_message.set_name('FND', 'FND_USER_EXISTS_NO_LINK');

4301: return(USER_SYNCHED);
4302: -- next time when this user gets created in fnd, it will be
4303: -- linked to each other.
4304: else
4305: fnd_message.set_name('FND', 'FND_USER_EXISTS_NO_LINK');
4306: return(USER_EXISTS_NO_LINK_ALLOWED);
4307: end if;
4308: else
4309: return(USER_OK_CREATE);

Line 4327: -- begin retval := fnd_user_pkg.set_old_person_party_id(12345); end;

4323: --
4324: -- Usage example in pl/sql
4325: -- declare
4326: -- retval number := null;
4327: -- begin retval := fnd_user_pkg.set_old_person_party_id(12345); end;
4328: --
4329: -- Input (Mandantory)
4330: -- x_old_person_party_id: Old Person Party Id
4331: --

Line 4360: -- retval := fnd_user_pkg.set_old_user_guid(guid); end;

4356: -- retval number := null;
4357: -- guid raw(16);
4358: -- begin
4359: -- guid := 'F9374D4B80AB1A86E034080020B2612C';
4360: -- retval := fnd_user_pkg.set_old_user_guid(guid); end;
4361: --
4362: -- Input (Mandantory)
4363: -- x_old_user_guid: Old USER GUID
4364: --

Line 4412: from fnd_user

4408:
4409:
4410: -- bug 5162136 Obtain the user_id for later use
4411: select user_guid, user_id into l_user_guid, userid
4412: from fnd_user
4413: where user_name = x_user_name;
4414:
4415: if (l_user_guid is null) then
4416: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then

Line 4493: -- This is called by the fnd_user_pkg and fnd_web_sec

4489:
4490: ----------------------------------------------------------------------------
4491: --
4492: -- ldap_wrapper_update_user (PUBLIC)
4493: -- This is called by the fnd_user_pkg and fnd_web_sec
4494: -- It serves as a helper routine to call fnd_ldap_wrapper.update_user
4495: -- when we need to synch the user update to OID.
4496: -- Note
4497: -- Please note that even this is public procedure, it does not mean for

Line 4519: -- APIs since the expiration calculation is done in fnd_user_pkg.UpdateUserInternal.

4515: 'Begin - set l_expire_pwd before calling fnd_ldap_wrapper');
4516: end if;
4517:
4518: -- Bug 13472484 - Using global when called from fnd_web_sec.change_password
4519: -- APIs since the expiration calculation is done in fnd_user_pkg.UpdateUserInternal.
4520: -- where this global is set.
4521: -- Any other calls to this API should use the arg x_expire_pwd.
4522:
4523: if (G_EXPIRE_USER_PWD is not null) then

Line 4547: 'set fnd_user pwd to be EXTERNALLY managed. l_pwd_ret = '||l_pwd_ret);

4543: -- to update the password to EXTERNAL.
4544:
4545: if (fnd_log.LEVEL_STATEMENT >= fnd_log.g_current_runtime_level) then
4546: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head||'.'||l_api_name,
4547: 'set fnd_user pwd to be EXTERNALLY managed. l_pwd_ret = '||l_pwd_ret);
4548: end if;
4549:
4550: update fnd_user
4551: set encrypted_foundation_password = l_pwd_ret,

Line 4550: update fnd_user

4546: fnd_log.string(FND_LOG.LEVEL_STATEMENT, c_log_head||'.'||l_api_name,
4547: 'set fnd_user pwd to be EXTERNALLY managed. l_pwd_ret = '||l_pwd_ret);
4548: end if;
4549:
4550: update fnd_user
4551: set encrypted_foundation_password = l_pwd_ret,
4552: encrypted_user_password = l_pwd_ret
4553: where user_name = upper(x_user_name);
4554: end if;

Line 4561: -- This is called by user form and the fnd_user_pkg.

4557:
4558:
4559: --
4560: -- ldap_wrapper_create_user (PUBLIC)
4561: -- This is called by user form and the fnd_user_pkg.
4562: -- It serves as a helper routine to call fnd_ldap_wrapper.create_user
4563: -- when we need to synch that new FND user to OID.
4564: -- It also takes care of updating fnd_user with the user_guid and oid_pwd
4565: -- coming back from ldap_wrapper layer.

Line 4563: -- when we need to synch that new FND user to OID.

4559: --
4560: -- ldap_wrapper_create_user (PUBLIC)
4561: -- This is called by user form and the fnd_user_pkg.
4562: -- It serves as a helper routine to call fnd_ldap_wrapper.create_user
4563: -- when we need to synch that new FND user to OID.
4564: -- It also takes care of updating fnd_user with the user_guid and oid_pwd
4565: -- coming back from ldap_wrapper layer.
4566: -- Note
4567: -- Please note that even this is public procedure, it does not mean for

Line 4564: -- It also takes care of updating fnd_user with the user_guid and oid_pwd

4560: -- ldap_wrapper_create_user (PUBLIC)
4561: -- This is called by user form and the fnd_user_pkg.
4562: -- It serves as a helper routine to call fnd_ldap_wrapper.create_user
4563: -- when we need to synch that new FND user to OID.
4564: -- It also takes care of updating fnd_user with the user_guid and oid_pwd
4565: -- coming back from ldap_wrapper layer.
4566: -- Note
4567: -- Please note that even this is public procedure, it does not mean for
4568: -- other public usage. This is mainly created as a helper routine to

Line 4593: update fnd_user

4589: x_start_date, x_end_date,
4590: x_description,x_email_address,x_fax,x_expire_pwd,
4591: l_user_guid, l_oid_pwd);
4592: if (l_user_guid is not null) then
4593: update fnd_user
4594: set user_guid = l_user_guid
4595: where user_name = x_user_name;
4596: end if;
4597:

Line 4637: from fnd_user

4633: l_user_guid := null;
4634:
4635: select user_guid
4636: into l_user_guid
4637: from fnd_user
4638: where user_name = x_old_user_name;
4639:
4640: if (l_user_guid is not null) then
4641: ldap_wrapper_change_user_name(l_user_guid, x_old_user_name, x_new_user_name);

Line 4680: -- fnd_user_pkg null value is being passed to the ldap APIs. This is causing

4676: -- If form passs in null value, that means change it to null.
4677:
4678: -- Bug 11704380
4679: -- On update if the field is null, whether it has been changed or not, the
4680: -- fnd_user_pkg null value is being passed to the ldap APIs. This is causing
4681: -- OID records to be updated to *NULL* values. We need to better handle a
4682: -- nulled out value but for the short term we will not pass this char and
4683: -- the OID data as is.
4684:

Line 4709: -- This is called by the fnd_user_pkg and fnd_web_sec.

4705: ----------------------------------------------------------------------------
4706: -- This routine is for AOL INTERNAL USE ONLY !!!!!!!
4707: --
4708: -- ldap_wrp_update_user_loader
4709: -- This is called by the fnd_user_pkg and fnd_web_sec.
4710: -- It serves as a helper routine to call fnd_ldap_wrapper.update_user
4711: -- when we need to synch the user update to OID.
4712: procedure ldap_wrp_update_user_loader(x_user_name in varchar2,
4713: x_hashed_password in varchar2,

Line 4734: from fnd_user

4730: l_pwd_ret := null;
4731: userid := null;
4732:
4733: select user_guid, user_id into l_user_guid, userid
4734: from fnd_user
4735: where user_name = x_user_name;
4736:
4737: if (l_user_guid is null) then
4738: return;

Line 4754: update fnd_user

4750: app_exception.raise_exception;
4751: end if;
4752:
4753: if (l_pwd_ret = fnd_web_sec.external_pwd) then
4754: update fnd_user
4755: set encrypted_foundation_password = 'EXTERNAL',
4756: encrypted_user_password = 'EXTERNAL'
4757: where user_name = upper(x_user_name);
4758: end if;

Line 4769: end FND_USER_PKG;

4765: app_exception.raise_exception;
4766:
4767: end;
4768:
4769: end FND_USER_PKG;