3

I want to add a custom page to magento and this page will be passed with some information (related to user login info and other details) based on the data it will do the operatations and redirect to the home page.

My requirement was to make the entry for user to login to magento without entering any data. I have pre stored some data which are used to verify the login. So I thought I will make a php page and will push the data to that php and it will login the user there and redirect to home page.

If there is any other better way to do it please advice?

What I need to do is I am trying to give a entry through mobile app (webview). So when user logging in from mobile I don't want user to reenter the login credentials. So I have stored the user email Id and a secret key (not password because of sync issue might face). So when user open the app - I am planning to hit this php page and login him automatically(by verifiying) and redirect to home page of magento.

closed as unclear what you're asking by Keyur Shah, Fabian Blechschmidt, Marius Jun 11 '15 at 13:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Hi Ted and welcome to MageOverflow! I don't understand what you want to do? Are we talking about a request, then you can implement a controller, are we talking about a already implemented page? then you want to implement an observer – Fabian Blechschmidt Jun 11 '15 at 13:47
  • Thanks, What I need to do is I am trying to give a entry through mobile app (webview) ..So when user logging in from mobile I don't want user to reenter the login credentials. So I have stored the user email Id and a secret key (not password because of sync issue might face). So when user open the app - I am planning to hit this php page and login him automatically(by verifiying) and redirect to home page of magento. – ted Jun 11 '15 at 13:55
3

Best to use Magento's modular approach and observe a login or pre controller dispatch and do your verifications in your modules code (which would include presetting values on signup forms).

Checkout any GeoIP lookup module as its most similar to the same approach mentioned:

    <events>
        <controller_front_init_before>
            <observers>
                <geoip>
                    <type>singleton</type>
                    <class>geoip/observer</class>
                    <method>controllerFrontInitBefore</method>
                </geoip>
            </observers>
        </controller_front_init_before>
    </events>

Source:

  • 1
    Do "controller_front_init_before" event for observing is a right choice ? To check the session login status and make user login ? Thanks – ted Jun 11 '15 at 18:11
  • Considering any front controller can be accessed by a customer, I believe it would be a good event to observe. – B00MER Jun 15 '15 at 1:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.