0

Please help me on this project.

I am trying change my website User name & Password & Admin Email Id.

I can not find it. In my php my admin, Please find the attachment. Showing like this. How to can i change it?

Swamy Simonenter image description here

2 Answers 2

0

please one file in root with below code and run php file like magentostoreurl/filename.php so that add new admin you can use that one.

<?php

require_once('app/Mage.php');
umask(0);
Mage::app();

try {
$user = Mage::getModel('admin/user')
->setData(array(
'username'  => 'newadmin',
'firstname' => 'newadmin',
'lastname'    => 'newadmin',
'email'     => '[email protected]',
'password'  =>'admin@123',
'is_active' => 1
))->save();

} catch (Exception $e) {
echo $e->getMessage();
exit;
}

//Assign Role Id
try {
$user->setRoleIds(array(1))  //Administrator role id is 1 ,Here you can assign other roles ids
->setRoleUserId($user->getUserId())
->saveRelations();

} catch (Exception $e) {
echo $e->getMessage();
exit;
}

echo "User created successfully";

?>
2
0

If you are not getting any data from admin_user table then just create a new user in admin_user table of your Magento Store. Input the data in table i.e username, password, email

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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