331: -- Bug 7160418 skip guest user as we do not audit guest
332: if (UID <> 6) then
333: select SESSION_NUMBER
334: into LSID
335: from FND_USER
336: where USER_ID = UID
337: for update of SESSION_NUMBER, LAST_LOGON_DATE;
338: LSID := LSID + 1;
339: SID := LSID;
339: SID := LSID;
340: --
341: -- Update session number, set logon date
342: --
343: update FND_USER
344: set LAST_LOGON_DATE = SYSDATE,
345: SESSION_NUMBER = LSID
346: where USER_ID = UID;
347:
350: --
351: begin
352: select 'Y'
353: into EXPIRED
354: from FND_USER
355: where USER_ID = UID
356: and ENCRYPTED_USER_PASSWORD <> 'EXTERNAL' -- Bug #2288977 --
357: and (PASSWORD_DATE is NULL or
358: (PASSWORD_LIFESPAN_ACCESSES is not NULL and
366: --
367: -- Decrement password accesses left
368: --
369: begin
370: update FND_USER
371: set PASSWORD_ACCESSES_LEFT = PASSWORD_ACCESSES_LEFT - 1
372: where USER_ID = UID
373: and PASSWORD_ACCESSES_LEFT > 0;
374: exception
400: -- (2) new_icx_session(UID,l_login_id): performs auditing and
401: -- session number related operation, to be used when a session
402: -- is created.
403: /* tests whether a password has expired or not, updates
404: * expiration related bookkeeping data in fnd_user table if necessary.
405: * update last_logon_date in fnd_user
406: */
407: procedure is_pwd_expired(UID in number,
408: EXPIRED out nocopy varchar2) is
401: -- session number related operation, to be used when a session
402: -- is created.
403: /* tests whether a password has expired or not, updates
404: * expiration related bookkeeping data in fnd_user table if necessary.
405: * update last_logon_date in fnd_user
406: */
407: procedure is_pwd_expired(UID in number,
408: EXPIRED out nocopy varchar2) is
409: pragma AUTONOMOUS_TRANSACTION;
413: --
414: begin
415: select 'Y'
416: into EXPIRED
417: from FND_USER
418: where USER_ID = UID
419: and ENCRYPTED_USER_PASSWORD <> 'EXTERNAL' -- Bug #2288977 --
420: and (PASSWORD_DATE is NULL or
421: (PASSWORD_LIFESPAN_ACCESSES is not NULL and
429: --
430: -- Decrement password accesses left
431: --
432: begin
433: update FND_USER
434: set PASSWORD_ACCESSES_LEFT = PASSWORD_ACCESSES_LEFT - 1
435: where USER_ID = UID
436: and PASSWORD_ACCESSES_LEFT > 0;
437: exception
438: when no_data_found then
439: null;
440: end;
441:
442: update FND_USER
443: set LAST_LOGON_DATE = SYSDATE
444: where USER_ID = UID;
445:
446: commit;
450: generic_error('FND_SIGNON.is_pwd_expired', SQLCODE, SQLERRM);
451: end is_pwd_expired;
452:
453: /*
454: * updates session_number in fnd_user table.
455: * generate auditing record
456: */
457: procedure new_icx_session(UID IN NUMBER,
458: login_id OUT nocopy NUMBER) IS
460: new_proxy_icx_session(UID, null, login_id);
461: end new_icx_session;
462:
463: /*
464: * updates session_number in fnd_user table.
465: * generate auditing record
466: * Same as new_icx_session except a single change for handling SIGNONAUDIT:LEVEL
467: * differently for Proxy Sessions.
468: */
481: -- Bug 7160418 skip guest user as we do not audit guest
482: if (UID <> 6) then
483: select SESSION_NUMBER
484: into LSID
485: from FND_USER
486: where USER_ID = UID
487: for update of SESSION_NUMBER, LAST_LOGON_DATE;
488: LSID := LSID + 1;
489: --
488: LSID := LSID + 1;
489: --
490: -- Update session number, set logon date
491: --
492: update FND_USER
493: set LAST_LOGON_DATE = SYSDATE,
494: SESSION_NUMBER = LSID
495: where USER_ID = UID;
496: else
554: is
555: begin
556: if (func_name is null) then
557: -- Delete if value nulled out
558: delete from FND_USER_DESKTOP_OBJECTS
559: where USER_ID = update_desktop_object.user_id
560: and APPLICATION_ID = update_desktop_object.appl_id
561: and RESPONSIBILITY_ID = update_desktop_object.resp_id
562: and TYPE = 'FUNCTION'
562: and TYPE = 'FUNCTION'
563: and SEQUENCE = update_desktop_object.func_sequence;
564: else
565: -- Try for update
566: update FND_USER_DESKTOP_OBJECTS set
567: FUNCTION_NAME = update_desktop_object.func_name,
568: LAST_UPDATE_DATE = sysdate,
569: LAST_UPDATED_BY = update_desktop_object.user_id,
570: LAST_UPDATE_LOGIN = update_desktop_object.login_id
575: and SEQUENCE = update_desktop_object.func_sequence;
576:
577: if (sql%rowcount = 0) then
578: -- Insert new row if not found
579: insert into FND_USER_DESKTOP_OBJECTS (
580: DESKTOP_OBJECT_ID,
581: USER_ID,
582: APPLICATION_ID,
583: RESPONSIBILITY_ID,
967:
968: -- check user id exist.
969: select user_id
970: into l_user_id
971: from FND_USER
972: where user_id = p_userID;
973:
974: -- Bug 7169414 - rewrite - changed query to be the same used in the Forms login
975:
974: -- Bug 7169414 - rewrite - changed query to be the same used in the Forms login
975:
976: select count(ul.USER_ID)
977: into number_of_unsuccessful_logins
978: from fnd_unsuccessful_logins ul, fnd_user u
979: where u.user_id = l_user_id
980: and ul.user_id = u.user_id
981: and ul.attempt_time > nvl(u.last_logon_date, u.last_update_date);
982: