Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3947408
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:14:52+00:00 2026-05-20T01:14:52+00:00

I want to post the magento admin username and password through curl once the

  • 0

I want to post the magento admin username and password through curl once the login is successful should redirect to the magento admin dashboard.
How can i do it?
Basically magento login requires this information:

require_once ("magento\app\Mage.php" );
umask(0);

// Initialize Magento
Mage::app("default");

// You have two options here,
// "frontend" for frontend session or "adminhtml" for admin session
Mage::getSingleton("core/session", array("name" => "adminhtml"));
$session = Mage::getSingleton("admin/session");

How can I proceed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:14:52+00:00Added an answer on May 20, 2026 at 1:14 am
    <?php
    require_once 'app/Mage.php';
    umask(0);
    $app = Mage::app('default');
    
    Mage::getSingleton('core/session', array('name' => 'adminhtml'));
    
    // supply username
    $user = Mage::getModel('admin/user')->loadByUsername('adminusername');
    
    if (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
      Mage::getSingleton('adminhtml/url')->renewSecretUrls();
    }
    
    $session = Mage::getSingleton('admin/session');
    $session->setIsFirstVisit(true);
    $session->setUser($user);
    $session->setAcl(Mage::getResourceModel('admin/acl')->loadAcl());
    Mage::dispatchEvent('admin_session_user_login_success',array('user'=>$user));
    
    if ($session->isLoggedIn()) {
      echo("logged in");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to post this form from server side (ASP.NET/C#): <FORM action=https://login:password@payment.architrade.com/cgi-adm/refund.cgi method=POST> <input
I want to post on twitter wall but don't want that user can edit
I created a NSEvent and I want to post it. How can I do
I want to POST an URL using CURL and php. There is a big
I want to post some binary data to a website. The file can be
I want to POST a form using ASP.NET. How can I do this? I
hi I m new in development blackberry application. I want post email and password
I want to post syntax highlighted code on my blog but I can't find
I want to post a picture to the wall, just like what I can
I want to post a forma poupup window. Problem is, the form posts successfully

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.