in Oracle Apex i want to redirect users to their specific pages after login as per their user types. please help how i can do this. currently tried on Page 1 (Home) -> Before Header - Branches - Function Returning a Page (Show Only) and my code is as below. also Enabled deep linking through Shared Components -> Security Attributes.
declare
x varchar2(5):=1;
utype varchar2(100);
myurl varchar2(255);
begin
utype := APEX_UTIL.GET_SESSION_STATE('SESSION_USER_TYPE');
if utype in ('admin', 'zoneadmin') then
x := '1';
elsif utype in ('rider') then
x := '24';
end if;
return x;
end;
after login, google says:
127.0.0.1 redirected you too many times.
try clearing your cookies
ERR_TOO_MANY_REDIRECTS
even i removed all chrome cookies from settings. please help to overcome the situation.
regards