How to obtain current session user, after api_security.login ?

asked 09 Jun '14, 10:15

ddjuric's gravatar image

ddjuric
114
accept rate: 0%


Hi Dusan,

The api_security API does not provide such a function but you can use api_session.add API to add the current user to the session as a session parameter once the login is successful. Then in your code, you can retrieve the current user using the api_session.getValueTx API whenever you need.

Kind Regarda,
Yalim

link

answered 09 Jun '14, 10:34

Yalim%20Gerger's gravatar image

Yalim Gerger ♦♦
1.8k5
accept rate: 15%

edited 09 Jun '14, 10:35

Thx Yalim.

(10 Jun '14, 02:19) ddjuric

Hi Yalim,

I want to audit table changes using current user id. Tables are in the "APP_DB" oracle schema, FS PL/SQL code are in the "APP_UI" schema. After log in I keep current user id with api_session.add() (schema APP_UI). I've created after-update trigger on the table and try to get session value with api_session.getValueNr() (schema APP_DB). But I get a null value of a current user (do an update action via FS-form).

Can I get a session value in this case?

Best regards, Andrew

link

answered 30 Jun '14, 05:02

Andrew%20Pouckatch's gravatar image

Andrew Pouck...
1610
accept rate: 0%

Hi Andrew,

I haven't tried this myself but I cannot think of a reason why this wouldn't work. I can think of two issues though: 1. The parameter you are getting might not be of type Number. 2. You might have more than one Formspider installation in your database and, APP_UI and APP_DB schemas are pointing to different ones.

Hope this helps.

Kind Regards,
Yalim

link

answered 30 Jun '14, 05:45

Yalim%20Gerger's gravatar image

Yalim Gerger ♦♦
1.8k5
accept rate: 15%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×9
×4

Asked: 09 Jun '14, 10:15

Seen: 1,199 times

Last updated: 30 Jun '14, 05:45


© Copyright Gerger 2017