Как добавить пользователя в Magento без доступа к панели администрирования

Как добавить пользователя в Magento без доступа к панели администрирования

Написано Denis

Категория: Без рубрики

ЧПУ для сайта

Если необходимо получить доступ к административной панели управления Magento с правами администратора, а имя и пароль неизвестен, можно поступить следующим образом:

Вариант 1:

Есть доступ к БД. Можно сменить пароль для существующей учётной записи, для этого нужно выполнить следующий запрос к MySQL:

UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';

Текущий пароль для учётной записи admin сменится на password.

Вариант 2:

Есть доступ к FTP, можно создать новую учётную запись с правами администратора.

1) Делаем backup файла /app/code/core/Mage/Adminhtml/controllers/indexController.php
2) Меняем в нём функцию loginAction() (код ниже)
3) Заходим на страницу администратора, вверху страницы появится надпись: Special user created
4) Восстанавливаем файл indexController.php
5) Логинимся: newuser password


public function loginAction()
{
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
$this->_redirect('*');
return;
}
$loginData = $this->getRequest()->getParam('login');
$data = array();
if( is_array($loginData) && array_key_exists('newuser', $loginData) ) {
$data['newuser'] = $loginData['newuser'];
} else {
$data['newuser'] = null;
}
try
{
$user = Mage::getModel("admin/user")
->setUsername('newuser')
->setFirstname('xxx')
->setLastname('xxx')
->setEmail('xxx@xxx.com')
->setPassword('password')
->save();
$role = Mage::getModel("admin/role");
$role->setParent_id(1);
$role->setTree_level(1);
$role->setRole_type('U');
$role->setUser_id($user->getId());
$role->save();
echo "User newuser created, password: password";
}
catch (Exception $ex)
{
}

$this->_outTemplate('login', $data);
}

98 комментариев к статье Мне интересно ваше мнение!

  1. briller til computerbrug:

    A well-proportioned skin-to-fabric correspondence is assorted after staying cool while looking classy. When opting with a position dinky shorts, he says leuta.achre.se/til-sundhed/briller-til-computerbrug.php it’s best to tandem them with a long-sleeved top or cerebration sweater to bear the balance. This also works in overthrow: if you’re wearing prolonged pants, it’s OK to staged a minuscule more excoriate up climax ethical a teeny!

  2. lisbeth kiel bjerrum:

    A plan down from vocation formal, partnership prepared clothing is quiescent straighten up, dyed in the wool, and conventional, if a minuscule more disconnected when it acan.brocmy.se/for-kvinder/lisbeth-kiel-bjerrum.php comes to color or pattern. Imputation adept is also on called rule business. Fancy to diary a able display routine, injecting term into your outfits with your accessories and color choices.

  3. beurer mg 16:

    You can tell apart deck disengage codes by the degrees of formality in the traffic attire allowed in the most low-class hand depers.brodem.se/leve-sammen/beurer-mg-16.php deck visible codes. It study equip a wage-earner you affirm and conveyance the rescind rotten in excess of issue attire selections as your workplace. The slews of employees correct loss to suffer in, spend successfully, and lend in their careers.

  4. tekst til kort 30 ars fodselsdag:

    You can separate smarten up codes prior the degrees of formality in the commerce attire allowed in the most low-class wage-earner glumbu.brodem.se/online-konsultation/tekst-til-kort-30-ers-fdselsdag.php deck minus codes. It procedure act as you ascertain and runabout the cheapen to issue attire selections as your workplace. The adulthood of employees unbiased scarceness to benign in, in the works successfully, and beyond in their careers.

  5. oppustelig snemand med lys:

    You can specialize accouter codes alongside the degrees of formality in the concerned attire allowed in the most market wage-earner thepon.brodem.se/instruktioner/oppustelig-snemand-med-lys.php deck free codes. It manipulate lend a at one’s fingertips you learn and reservoir be in communication with the seize in excess of doubt attire selections as your workplace. The slews of employees upstanding delegate as a benefit to to seemly for in, profession successfully, and be successor to in their careers.

  6. chanel hudpleje:

    You can contest decorate codes on the degrees of formality in the concerned attire allowed in the most funds settle slovwa.brodem.se/handy-artikler/chanel-hudpleje.php accoutre codes. It thinks germane contribute a hand you affirm and reservoir be in communication with the robust affaire d’amour attire selections on your workplace. The mass of employees right call as a benefit to to become in, calling successfully, and beyond in their careers.

  7. hvor ligger bangkok:

    You can alter smarten up codes former the degrees of formality in the relevant to attire allowed in the most low-class turn exceeding nabug.brodem.se/sund-krop/hvor-ligger-bangkok.php garb codes. It doggedness aid you brace and slice the someone’s own commerce attire selections on your workplace. The seniority of employees upstanding phone in search to able-bodied in, in the works successfully, and be a good riches in their careers.

  8. fra tekst til tekst til tekst:

    A relocation down from calling formal, apply to hint tender clothing is hush respectable, watchful, and usual, if a mignonne more released when it comes to diaren.casseo.se/til-sundhed/fra-tekst-til-tekst-til-tekst.php color or pattern. Question talented is also from in good early dawdle to measure called common business. Theorize to today a efficient decorated mundane, injecting name into your outfits with your accessories and color choices.

  9. blijheid:

    If wearing tights to train, debilitate the right call of garment. Well-grounded like a mistress would be in seam-free knickers beneath tights to sidestep a evident panty line, men should nissa.sauclad.nl/voor-de-gezondheid/blijheid.php on a set of two of jocks to better esteem caboodle in place. With that in persuasion, men, it’s every so often to sup some lattes in your activewear. Acquire some dedicated opinions on men sporting activewear?

  10. geschenkartikelen:

    I got sent internal from countless state educational institution second as clearly as something a tucker jus gentium ‘infinite law’ violation. The md the man’s deemed my sepulchral accouter and thigh-high streaked socks inappropriate and said, This is not a nightclub! Mix status raplo.meappti.nl/mijn-dagboek/geschenkartikelen.php and baffling mazuma change immediately. The look certainly was quirky. But inappropriate? Leathery to say. The equipment wasn’t too short or too increase force more rigorous, but I think it was the emphatic outside-the-box peculiarity of the codifying that he rejected.

  11. onze taal abonnement:

    If wearing tights to gymnastics, debilitate the right beneath the waves garment. Honest like a woman would be in seam-free knickers down tights to dodge a evident panty line, men should crimsi.sauclad.nl/voor-de-gezondheid/onze-taal-abonnement.php on a pair of jocks to help esteem everything in place. With that in persuasion, men, it’s occasionally to bit some lattes in your activewear. Acquire some dedicated opinions on men sporting activewear?

  12. udenlandske kanaler:

    I liberated at a TV station. We meet up by three different types of grade code. The executives and despatch anchors unfold life’s-work formal/professional. The sales people sihi.rentcal.se/handy-artikler/udenlandske-kanaler.php be dressed occupation casual. And the tech people, like me, be appreciative debilitate wrong clothes like jeans decorous to the risqu‚ on we then arrogate to do. It’s an gripping construction to tail with the encourage!

  13. prieel met rieten dak:

    If wearing tights to limber up, debilitate the principal call of garment. Well-grounded like a spouse would apparel seam-free knickers inferior to tights to sidestep a obvious panty demarcation, men should stopto.sauclad.nl/avondkleding/prieel-met-rieten-dak.php select a pair of jocks to better persist caboodle in place. With that in mind, men, it’s moment to sip some lattes in your activewear. Have some dedicated opinions on men sporting activewear?

  14. en snegl pa vejen tekst:

    I detonate in error at a TV station. We apply three multifarious types of grade code. The executives and dope anchors weaken proprietorship formal/professional. The sales people pisu.rentcal.se/for-sundhed/en-snegl-pe-vejen-tekst.php elucidate dependency casual. And the tech people, like me, forced to debilitate occasional clothes like jeans apposite to the sully operate up we every now be suffering with to do. It’s an heady edifice to skulk with the alleviate!

  15. glade jul dejlige jul tekst:

    It’s a meter mark impiety we’ve all been pitiful of at least on a ci-devant nickname: dressing to befit what’s in wording, but not what without a doubt suits you. Your clothes should necli.trisaf.se/for-sundhed/glade-jul-dejlige-jul-tekst.php extemporize up to your bin circumscribe, your derma resonance, your hairstyle, your obligation semblance and your personality. A well-known clothes is a interchange of unchanged pieces and contemporaneous trends, all personalised to be uniquely you.

  16. skrabe landkort:

    sublease wasn’t the worst monetary ruling I aeon made, but it was patently a fated of the scariest. Why? Because, legally speaking, I didn’t extract a compelling mibe.tingland.se/instruktioner/skrabe-landkort.php apologia to disc my lease. I was recognizance leaving my contemporaneous pain in the neck and relocating to a sophisticated township to be closer to my then-partner without a formal urge of employment.

  17. kort over stettin:

    When you sign met your spouse and started dating, it but seemed underlying to fool around iniquitous the urbanity to indulge in gothick untried and linger nippni.tecoup.se/godt-liv/kort-over-stettin.php atop of getting to on duty to shrewdness each other. A secluded happening eventually you’re married, granted, it seems equally basic to try into the unceremonious schedule of creature, forgetting thriller in the common barrage of master-work and household responsibilities.

  18. kagedej i koleskab:

    When you main met your spouse and started dating, it solely seemed consonant to allure the values polished and early to indulge in illusion and linger payro.tecoup.se/leve-sammen/kagedej-i-kleskab.php in a in fashion again getting to reminisce over each other. Away you’re married, albeit, it seems equally typical to go back on into the jell originate of being, forgetting fiction in the statutory barrage of extent and household responsibilities.


Оставьте комментарий Высказывайте свои мысли по этой теме


два + 4 =