PL/SQL to get the Full Name [ LDAP APEX ]
Hi There!
Have a application that uses LDAP Authentication.
All I'm trying to do is store the user full name in the Database when he/she enters a comment.
So for that I need to write a pl/sql function in the Default Value that returns a full name based on loggeed in LDAP userid.
I came up with the following code.
declare
s_username varchar2(255);
s_lname varchar2(255);
s_fname varchar2(255);
s_totalname varchar2(255);
begin
s_lname := APEX_UTIL.get_last_name (APEX_UTIL.get_username( APEX_UTIL.get_current_user_id ) );
s_fname := APEX_UTIL.get_first_name (APEX_UTIL.get_username( APEX_UTIL.get_current_user_id ) );
s_totalname := s_fname|| ' ' || s_lname;
return s_totalname;
end;
But unfortunately APEX_UTIL gets the workspace userid instead of LDAP user id.
I tried APEX_LDAP package as well but dint come up with any solution.
Any help is greatly Appreciated.
Thanks for your time :)