After #2857056: Login block shown when logged in, it's no longer possible to place the login block in /user/login.

The reason is this code, in the blockAccess function:

if ($account->isAnonymous() && !in_array($route_name, ['user.login', 'user.logout'])) {

This only allows access if the user is anonymous (makes sense), and if the path is anything but user/login or user/logout.. I don't get it why this condition is there.. I want to show the openid login as an option in user/login, and this line is preventing me from doing so.

Comments

jcnventura created an issue. See original summary.

jcnventura’s picture

Status: Active » Needs review
StatusFileSize
new2.35 KB
jcnventura’s picture

StatusFileSize
new2.73 KB

Forget the previous patch. I hadn't removed the route parameter from the create().

yannickoo’s picture

Status: Needs review » Reviewed & tested by the community

Works fine for me and looks good, thanks! 💪

  • sanduhrs committed a57b065 on 8.x-1.x authored by jcnventura
    Issue #2905669 by jcnventura: Allow login block in to be placed on /user...

sanduhrs credited sanduhrs.

sanduhrs’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thank you!

Status: Fixed » Closed (fixed)

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