In some cases, we not only need to log in the user but specify where the user should be redirected after a succesfully login.

Right now this is not possible in DrupalWebTestCase->drupalLogin.

Comments

penyaskito’s picture

Assigned: bomoko » Unassigned
Status: Needs review » Active
Issue tags: -Novice, -Needs reroll

As a workaround, I implemented method drupalLoginWithDestination that can be seen here: http://drupalcode.org/project/uc_cart_login_flow.git/blob/ddf4b8cf1145bb...

Anyway, a patch for drupalLogin follows.

[Edited: fixed link, the project is no longer a sandbox]

penyaskito’s picture

Status: Active » Needs review
StatusFileSize
new1.22 KB

First version of the patch for drupalLogin.

xjm’s picture

Status: Needs review » Needs work
Issue tags: +Novice

Tagging as novice for the task of rerolling the Drupal 8.x patch on account of #22336: Move all core Drupal files under a /core folder to improve usability and upgrades.

If you need help rerolling this patch, you can come to core office hours or ask in #drupal-gitsupport on IRC.

kathyh’s picture

Status: Needs work » Needs review
StatusFileSize
new1.24 KB

Updated per #3

sammyd56’s picture

StatusFileSize
new1.23 KB

Fixed typo and changed the wording a little.

star-szr’s picture

Issue tags: +Needs reroll

Tagging for reroll.

bomoko’s picture

Assigned: Unassigned » bomoko

Assigning this to myself for reroll duty

bomoko’s picture

StatusFileSize
new1.25 KB

Rerolled version of patch

bomoko’s picture

StatusFileSize
new1.25 KB

Rerolled version of patch ** edit (sorry for the double post) **

bomoko’s picture

Status: Active » Needs review
Issue tags: +Novice, +Needs reroll
jthorson’s picture

jthorson’s picture

Issue tags: -Needs reroll

Updating tags

Ash07’s picture

Issue tags: -Novice
quietone’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

drupalLogin-with-origin-1318070-8_0.patch no longer applies.

error: patch failed: core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php:517
error: core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php: patch does not apply

sun’s picture

Status: Needs work » Postponed (maintainer needs more info)

I'd like to see a justification and clarification on this statement before we move forward here:

In some cases, we not only need to log in the user but specify where the user should be redirected after a succesfully login.

Solthun’s picture

Assigned: Unassigned » Solthun

rerolling

Solthun’s picture

Assigned: Solthun » Unassigned

nevermind, just noticed the status :)

penyaskito’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

It has been a long time, and I didn't care anymore about it. So if you don't find it relevant, I'm fine with a closed(Won't fix).