As a follow-up to #886878: add option to show registration form rather than login on access denied pages, it would be nice if the unified login could be shown on 403.
I thought adding yet another checkbox to the admin UI was too much, and I think this is the expected behavior.
If you want another checkbox, I can do that too.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | logintoboggan-unified_on_403-3.patch | 3.63 KB | hunmonk |
| #2 | logintoboggan-unified_on_403-2.patch | 1.3 KB | hunmonk |
| logintoboggan-unified_on_403.patch | 537 bytes | tim.plunkett |
Comments
Comment #1
jyee commentedThis patch works and is what I had expected from normal functionality. If you select unified login for the normal login/register, that same setting should apply to the 403/access denied page as well.
Comment #2
hunmonk commentedso, try the attached patch. untested, but i think it will accomplish the goal and fix those issues noted above.
Comment #3
hunmonk commentedfurther refinement, broke the generation of the unified login form out into a separate function from the full page generation. this cleans up the usage of the unified login form nicely.
light testing seems to show everything working, but i would like confirmation from somebody else here before i commit.
Comment #4
tim.plunkettMy only nitpick:
Why not just return instead of instantiating a variable? And then they could be if() not elseif()
Comment #5
hunmonk commentedthe caller is expecting a string, this is a clean way to always return a string. i also find it easier to debug code when you put something in a variable first before returning it (easier to toss in a var_dump()).
Comment #6
hunmonk commenteddid a bit more testing, and i think this is good to go. committed to 7.x-1.x.