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:
@@ -59,6 +59,7 @@ recordThe resultant hash is recorded as the username 'password hash'
|
|||||||
p_password IN VARCHAR2);
|
p_password IN VARCHAR2);
|
||||||
--
|
--
|
||||||
|
|
||||||
|
FUNCTION get_user_status(p_username IN VARCHAR2) RETURN VARCHAR2;
|
||||||
/** Updates the user status
|
/** Updates the user status
|
||||||
*/
|
*/
|
||||||
PROCEDURE set_user_status(p_username IN VARCHAR2, p_status IN VARCHAR2);
|
PROCEDURE set_user_status(p_username IN VARCHAR2, p_status IN VARCHAR2);
|
||||||
@@ -133,17 +134,7 @@ CREATE OR REPLACE PACKAGE BODY mip_security AS
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
END;
|
END;
|
||||||
|
|
||||||
/**
|
PROCEDURE update_status_on_login(p_uname IN VARCHAR2, p_password IN VARCHAR2) IS
|
||||||
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;
|
l_password_days NUMBER;
|
||||||
l_password_created_on DATE;
|
l_password_created_on DATE;
|
||||||
BEGIN
|
BEGIN
|
||||||
@@ -166,6 +157,27 @@ CREATE OR REPLACE PACKAGE BODY mip_security AS
|
|||||||
|
|
||||||
END IF;
|
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
|
IF get_user_status(p_uname) = 'OPEN' THEN
|
||||||
|
|||||||
Reference in New Issue
Block a user