What is the purpose of the isFirstPageAfterLogin method in the admin / session model?

I see where this method is used, but I wonder who has an authoritative answer to this question?

+4
source share
2 answers

I know that you said you know where, but I'm going to mention it here for completeness, because you don’t ... hope you don’t mind! :)

A flag that has isFirstPageAfterLogin () checked is set in the login () method, which is called during the administrator login process.

Used in the following places:

  • Mage_Adminhtml_IndexController to save the value in the administrator session so that it is still available when the first page loads after submitting the login form.
  • Mage_Adminhtml_Block_Notification_Window to determine whether or not to show a window notification, which is often displayed after logging in.
  • Several actions on the Mage_Adminhtml_Report_StatisticsController to redirect the user to the page to which they should be, if their login directs them to one of the report update actions.
  • Mage_Core_Controller_Front_Action uses it to redirect the user to the control panel if their login directs them to an action that sends a download response, which can often rely on filter data that may or may not be available to the controller if it comes from the input.

Thus, to do this, this is a very important flag that is used to control behavior behind the scenes. The most important thing is to redirect to the correct login page and allow one-time notifications to be displayed at the entrance to the system.

+8
source

This value is used in the Mage_Adminhtml_IndexController , in particular indexAction() , and redirects the administrator user to the start page defined in System > Configuration > Advanced > Admin > Startup Page .

+2
source

Source: https://habr.com/ru/post/1389532/


All Articles