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
This commit is contained in:
mullenm
2007-12-14 14:05:05 +00:00
parent af4d87ac14
commit 66af74e120

View File

@@ -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