Hello,
Can anyone please help with this problem. I am using Oracle Application express authentication and redirecting the users to different page based on their roles; once they login. This is working fine. The problem I have is even if the user is not a valid user; he is able to login to application with no data found message. Below is the login process which I am using. For no data found, I added an exception.
If the user is not a valid user then it should display a message Invalid Login credentials. The process which I have is over riding this step. Please help. Any help is appreciated.
--my login process on pg 101
DECLARE
v_role VARCHAR2 (30);
v_page NUMBER;
BEGIN
SELECT user_role
INTO v_role
FROM users
WHERE USER_ID = UPPER (TRIM (:P101_USERNAME));
IF v_role = 'ADMIN'
THEN
v_page := 1;
ELSIF v_role = 'USER'
THEN
v_page := 32;
ELSE
v_page := 200;
END IF;
APEX_UTIL.
set_session_state (p_name => 'FSP_AFTER_LOGIN_URL', p_value => NULL);
wwv_flow_custom_auth_std.login (P_UNAME => :P101_USERNAME,
P_PASSWORD => :P101_PASSWORD,
P_SESSION_ID => v ('APP_SESSION'),
P_FLOW_PAGE => :APP_ID || ':' || v_page);
EXCEPTION WHEN NO_DATA_FOUND THEN
v_role := NULL;
END;
Thanks,
Orton