Timeline for How do I show a link to the user registration page only to anonymous users?
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 23, 2016 at 3:34 | history | tweeted | twitter.com/StackDrupal/status/701973354069237760 | ||
| Feb 21, 2016 at 22:55 | comment | added | mpdonadio♦ | This is a really interesting question. Since, you are using the 'internal:' scheme, there is no difference between using that and the route name (though, you should really use the route name. Both will end going through the path validator, and authenticated users should get an access denied. But, there is an AccessDeniedSubscriber to redirect authenticated users to their edit pages. I think that is the root cause of the problem. | |
| Feb 21, 2016 at 3:03 | comment | added | Patrick Kenny | @MPD That's what I thought, so I edited, but upon further testing, it looks like route_name: user.register is ok, but like url still shows for admins. | |
| Feb 20, 2016 at 22:17 | comment | added | mpdonadio♦ | Are you saying route_name: user.register instead of the url: ... didn't work? | |
| Feb 20, 2016 at 18:19 | vote | accept | Patrick Kenny | ||
| Feb 20, 2016 at 17:05 | answer | added | No Sssweat | timeline score: 4 | |
| Feb 20, 2016 at 16:45 | comment | added | Patrick Kenny | @NoSssweat Adding _user_is_logged_in: 'FALSE" as a requirement in mymodule.links.menu.yml and clearing caches doesn't hide the link from my admin account when logged in. | |
| Feb 20, 2016 at 16:44 | history | edited | Patrick Kenny | CC BY-SA 3.0 | added 5 characters in body |
| Feb 20, 2016 at 16:21 | comment | added | No Sssweat | maybe you need _user_is_logged_in: 'FALSE' | |
| Feb 20, 2016 at 15:51 | history | asked | Patrick Kenny | CC BY-SA 3.0 |