Not a bug old templates used in core code (login_form)

tenants

Well-known member
Affected version
v2.3.4
My 1st bug report (haven't used xf in years, only been at it for a few days), so I'm probably completely wrong

There are a few places in the code that look like they refer to old templates (login_form)
class ErrorController extends AbstractController"
Code:
public function actionDispatchError(ParameterBag $params)
    {
        // if we got here and we're not logged in, we basically just need to force the login screen
        if (!\XF::visitor()->is_admin)
        {
            return $this->view('XF:Login\Form', 'login_form');
        }

        return $this->plugin(ErrorPlugin::class)->actionDispatchError($params);
    }
and class LoginController extends AbstractController

I only noticed this, since I was doing something like this while writing a plugin (following xf tutorials, but minor change):
Code:
if (!\XF::visitor()->user_id)
{
       return $this->noPermission("no_permission"); // I'm sure it's common to use the asserts here, but noticed this as I was playing around
}

It's almost certainly a silly mistake by me, but seems like you're refering to a template that doesn't exist (login_form)

Screenshot 2025-02-04 at 19.07.23.webp
 
login_form is the correct name for the admin login form so that’s probably correct but not at my desk right now to confirm the exact context of the code.
 
got it, not a bug, sorry. I thought it might be something like that, I'm just looking in the wrong template area

Yes it's in the admin section... 🤦‍♂️
 
Back
Top Bottom