From 66af74e1201bdc6869ebbdf59a8eb711f3e9a8e6 Mon Sep 17 00:00:00 2001 From: mullenm Date: Fri, 14 Dec 2007 14:05:05 +0000 Subject: [PATCH] changed the way the user status is updated on login to correct a "no data found" error. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3004 248e525c-4dfb-0310-94bc-949c084e9493 --- Modules/mip_security.pck | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/Modules/mip_security.pck b/Modules/mip_security.pck index 4e1f23f..93b3d70 100644 --- a/Modules/mip_security.pck +++ b/Modules/mip_security.pck @@ -59,6 +59,7 @@ recordThe resultant hash is recorded as the username 'password hash' p_password IN VARCHAR2); -- + FUNCTION get_user_status(p_username IN VARCHAR2) RETURN VARCHAR2; /** Updates the user status */ PROCEDURE set_user_status(p_username IN VARCHAR2, p_status IN VARCHAR2); @@ -133,18 +134,8 @@ CREATE OR REPLACE PACKAGE BODY mip_security AS COMMIT; END; - /** - Logs the user into the system and registers with APEX. - - if the user account is 'OPEN', log them in and flow to the requested page - if the user account is 'EXPIRED', log them in and flow to the 'Change Password' page - if the user account is 'LOCKED', log the user out and flow to the 'Locked' page - */ - PROCEDURE login(p_uname IN VARCHAR2 - ,p_password IN VARCHAR2 - ,p_session_id IN VARCHAR2 - ,p_flow_page IN VARCHAR2) IS - l_password_days NUMBER; + PROCEDURE update_status_on_login(p_uname IN VARCHAR2, p_password IN VARCHAR2) IS + l_password_days NUMBER; l_password_created_on DATE; BEGIN -- check that the account is still valid (password etc.). @@ -166,6 +157,27 @@ CREATE OR REPLACE PACKAGE BODY mip_security AS END IF; -- + EXCEPTION + WHEN no_data_found THEN + NULL; -- no password/user exists to update the status of. + END update_status_on_login; + -- + + /** + Logs the user into the system and registers with APEX. + + if the user account is 'OPEN', log them in and flow to the requested page + if the user account is 'EXPIRED', log them in and flow to the 'Change Password' page + if the user account is 'LOCKED', log the user out and flow to the 'Locked' page + */ + PROCEDURE login(p_uname IN VARCHAR2 + ,p_password IN VARCHAR2 + ,p_session_id IN VARCHAR2 + ,p_flow_page IN VARCHAR2) IS + + BEGIN + -- check that the account is still valid (password etc.). + update_status_on_login(p_uname, p_password); -- IF get_user_status(p_uname) = 'OPEN' THEN