Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL to get the Full Name [ LDAP APEX ]

vamshi617May 17 2011 — edited May 18 2011
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 :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2011
Added on May 17 2011
11 comments
4,051 views