cancel
Showing results for 
Search instead for 
Did you mean: 

Forcing a portal logoff...suggestions?

Former Member
0 Kudos

I am almost successfully mimicking the same portal logoff that happens when a user clicks the logoff link in the masthead (but I am not prompting the user "Are you sure?").

Now, the masthead performs a response.redirect.

But if I do that from MY iview - which is in the content area, not the masthead, then the portal user is redirected to the logon page <i>in the content area</i>. The masthead and TLN are still there. So when the user re-logs on, the portal is opened <i>again</i> in the content area. So, the user has two mastheads and two TLNs.

I was thinking about maybe forcing the browser to close, but I can't get window.close to work in javascript. (Or even top.window.close). My JS book says that this will not work if the browser was not <i>opened</i> with javascript.

So...

is there a way to force the browser to refresh? Call to the API for F5?

Or...

apply the response.redirect to the entire portal/broser, not just my iview?

Any other suggestions?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Eric & Jacob,

You couls also use that

href = "your portal/irj/portal?logout_submit=1"

it will log off the user .

hope it helps,

Yoav

Former Member
0 Kudos

I found a workaround. Thanks to all who looked at my question.

Former Member
0 Kudos

Hi Eric.

Please share your workaround...:)

Best regards,

Jacob

Former Member
0 Kudos

What you could do is to have your logoff component inherit from the AbstractPortalComponent and overwrite the doOnNodeReady method.

This method is called before any other iview is presented and you can supress the rest of the iviews and logoff the entire browser.

Do some searching for doOnNodeReady in the forum and you should find some examples (not at the same functionality, but how the method works)