A project I'm working on has the need to change the $gotourl value when a user logs out.

A drupal_alter() in simplesamlphp_auth_user_logout() would allow for this.

Patch coming shortly.

Comments

epicflux created an issue. See original summary.

epicflux’s picture

StatusFileSize
new1.07 KB
epicflux’s picture

Status: Active » Needs review
snufkin’s picture

Could you add some examples into the implementation in the API file please?

epicflux’s picture

StatusFileSize
new1.69 KB

Added a couple examples to the API file.

bdone’s picture

this works nicely @epicflux, thanks! a few minor coding standards review for the new API example...

  1. +++ b/simplesamlphp_auth.api.php
    @@ -0,0 +1,41 @@
    + * @param $gotourl
    

    this could pass coding standards by adding the optional string parameter type

  2. +++ b/simplesamlphp_auth.api.php
    @@ -0,0 +1,41 @@
    + *  The url to be passed to simplesamlphp.
    

    this parameter comment should be indented w/ 3 spaces

  3. +++ b/simplesamlphp_auth.api.php
    @@ -0,0 +1,41 @@
    + * @param $account
    

    this could pass coding standards by adding the optional object parameter type

  4. +++ b/simplesamlphp_auth.api.php
    @@ -0,0 +1,41 @@
    + *  The user being logged out.
    

    this parameter comment should be indented w/ 3 spaces

epicflux’s picture

StatusFileSize
new1.7 KB

Cleaned up the coding issues.

bdone’s picture

Status: Needs review » Reviewed & tested by the community

+1, and working well.

  • snufkin committed 14f9802 on 7.x-2.x authored by epicflux
    Issue #2619262 by epicflux: Allow Modules to Alter $gotourl on User...
snufkin’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.71 KB

Committed it to 7.x-2.x, thanks for the work on this!

I ported it to 7.x-3.x and 8.x-3.x version, could someone test if i applied it right? Lets start with the 7.x version.

briand44’s picture

I tested the patch in #10 for 7.x-3.x and it applied cleanly and worked well for me. Thanks.

  • snufkin committed 67a7f17 on 7.x-3.x
    Issue #2619262 by epicflux, snufkin: Allow Modules to Alter $gotourl on...
snufkin’s picture

Status: Needs review » Fixed

Thanks for the review. Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.