Logout a user

This page will explain how you can log a user out of AdultWork.com. We have provided the cases you can use in the examples section below.

  

Redirect the user to the Unified Login via a pop-up or full screen.

To log the user out of AdultWork.com you will need to redirect the user to the Unified Login either in a pop-up or full screen.

There are a two options you can use

  • clearNickname
    • The Unified Login will remember the last logged in user and will display the nickname of the user when the user logs in again. To clear this known user just set the clearNickname to 'true'.
  • returnUrl
    • The Unified Login is aware when it is opened in a pop-up. When the Unified Login is opened in a pop-up the and the returnUrl is provided it will close itself and the calling page will redirect the user to the url specified. If the Unified Login is opened full screen the user will just be redirected to that url.

 

 

Examples

Note: The following examples are assuming that the user is logged into AdultWork.com. Replace {your-redirect-url} with a valid url if needed.

 

Example Pop-up 1

Open the Unified Login in a pop-up, clear the known user, close the pop-up and let the opening window redirect the user.

<script language="javascript">
    function popup(url) {
        var newWindow = window.open(url, 'logout', "scrollbars=yes, width=400, height=400");
if (window.focus) { newWindow.focus(); } } </script>
<a href="javascript:void(0);" onclick="popup('https://platform.adultwork.com/session/logout?clearNickname=true&returnURL={your-return-url}');">Logout</a>

 

Example Pop-up 2

Open the Unified Login in a pop-up, close the pop-up and let the opening window redirect the user.

<script language="javascript">
    function popup(url) {
        var newWindow = window.open(url, 'logout', "scrollbars=yes, width=400, height=400");
if (window.focus) { newWindow.focus(); } } </script>
<a href="javascript:void(0);" onclick="popup('https://platform.adultwork.com/session/logout?returnURL={your-return-url}');">Logout</a>

 

Example Pop-up 3

Open the Unified Login in a pop-up, clear the known user and leave the pop-up open.

<script language="javascript">
    function popup(url) {
        var newWindow = window.open(url, 'logout', "scrollbars=yes, width=400, height=400");
if (window.focus) { newWindow.focus(); } } </script>
<a href="javascript:void(0);" onclick="popup('https://platform.adultwork.com/session/logout?clearNickname=true');">Logout</a>

 

Example Pop-up 4

Open the Unified Login in a pop-up and leave the pop-up open.

<script language="javascript">
    function popup(url) {
        var newWindow = window.open(url, 'logout', "scrollbars=yes, width=400, height=400");
if (window.focus) { newWindow.focus(); } } </script>
<a href="javascript:void(0);" onclick="popup('https://platform.adultwork.com/session/logout');">Logout</a>

 

Example Full screen 1

Open the Unified Login full screen, clear the known user and redirect the user.

<a href="https://platform.adultwork.com/session/logout?clearNickname=true&returnURL={your-return-url}">Logout</a>

 

Example Full screen 2

Open the Unified Login full screen and redirect the user.

<a href="https://platform.adultwork.com/session/logout?returnURL={your-return-url}">Logout</a>

 

Example Full screen 3

Open the Unified Login full screen, clear the known user and keep the page open.

<a href="https://platform.adultwork.com/session/logout?clearNickname=true">Logout</a>

 

Example Full screen 4

Open the Unified Login full screen and keep the page open.

<a href="https://platform.adultwork.com/session/logout">Logout</a>