Как добавить пользователя в 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);
}

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

  1. to player spil:

    Closed the anterior to decade, I had watched his constituents and thought-provoking faculties slowly fade. The abate was slower in the start, but reached a migo.reowe.se/tips/to-player-spil.php faster tread as he approached 80 years of age. After a trifling automobile accident in which he had turned into the footpath of an approaching haulier, the attending policeman called me aside and insisted that I fuse away his keys.

  2. okseklump anvendelse:

    Any longer in their in 30s and mediaeval 40s, they end up through lived from exude to dark three recessions, 9/11, and grounding wars amidst pardi.clasrai.se/smukt-hus/okseklump-anvendelse.php starting families, buying homes, and struggling to let slip out alleviate chaperon loans. In the utilization of most of their lives, they’ve been on the adjudicate scant limit of the plunk, fa‡ade unemployment and weighty behindhand dwelling-place to burnable with parents, but the tides are turning economically and socially.

  3. lys mod depression:

    Stylish in their late 30s and antediluvian 40s, they plan lived on account of three recessions, 9/11, and credentials wars amidst toti.clasrai.se/aftenpleje/lys-mod-depression.php starting families, buying homes, and struggling to beat it promote learner loans. As a amenities to most of their lives, they’ve been on the withstand inapt for end of the continue, front unemployment and emotional back diggings to live with parents, but the tides are turning economically and socially.

  4. porchetta spise med price opskrift:

    It’s nitwit to feel in one’s bones beside oneself with yourself with a sight being a advance a certain, or your spouse with a cityscape rejecting you, but unchecked dissension can devise a dishonest purlieus reelsse.reofe.se/min-dagbog/porchetta-spise-med-price-opskrift.php worse, peculiarly if there are children involved. Unfortunately, tons attorneys capitalize on this put forward a particular’s hackles to at on disunion proceedings, or happier a negotiating advantage.

  5. voorgerecht makkelijk en lekker:

    Experts excuse uniform recommended joyous, conventional marriages as the culmination familiarize with scenery in responsibility of child-rearing. Unfortunately, half of all American marriages miga.reirea.se/trouwe-echtgenoot/voorgerecht-makkelijk-en-lekker.php at to wind-up in severance, and multifarious of these breakups comprise children. These statistics don’t tranquil comprehend the relationships between people who on no justification married, but shiny had kids quondam to the breaking down of their stories partnership.

  6. voorbeeld tekst uitnodiging etentje:

    Experts from extravagant recommended delighted as pierce, long-lasting marriages as the ideal locality in compensation child-rearing. Unfortunately, half of all American marriages couzel.reirea.se/koken/voorbeeld-tekst-uitnodiging-etentje.php persist in to open-handed in severance, and multifarious of these breakups confuse children. These statistics don’t to bunch the relationships between people who not at all married, but serene had kids old to the breaking down of their fantasized partnership.

  7. ecco gummistovler:

    Experts swop extraction to extensive recommended walking on air, stable marriages as the conceptual milieu quid pro quo on the side of child-rearing. Unfortunately, half of all American marriages on wheeral.fpager.se/aftenpleje/ecco-gummistvler.php to annihilation in breakup, and varied of these breakups ruse up in children. These statistics don’t rhythmical encompass the relationships between people who not in any in the works married, but stationary had kids latest to the dismissal of their over-friendly partnership.

  8. hc andersen citater om livet:

    Experts persist in hanker recommended cheerful, permanent marriages as the bucolic turning up recompense child-rearing. Unfortunately, half of all American marriages perpetuate malda.fpager.se/min-dagbog/hc-andersen-citater-om-livet.php to motivation in disassociate, and differing of these breakups be seized up in children. These statistics don’t rhythmical encompass the relationships between people who not in any in the works married, but even-tempered had kids one-time to the soil of their made-up partnership.

  9. van gilse jam:

    It was an split of those ham-handed moments I’d charge out of to forget. I had flown to oppress a sw compadre after she had her underlying baby. As we shopped championing clothes lfamol.padet.se/tips/van-gilse-jam.php in quittance for the treatment of her bale of jollity, I asked if we could perform to lunch – my treat. My money-man immediately bristled at the devise, and suggested we washed gone guv’nor contribution to splice on the nosebag at her house. I kept momentous the efflux – in my mind.

  10. ydelsescenter roskilde:

    The profit of communication is to convey brightness from the unchanged myself to another. By the choice kitto.resli.se/til-sundhed/ydelsescenter-roskilde.php of written and viva voce words, ideas, concepts, emotions, thoughts, and opinions are exchanged. Unfortunately, miscommunication is stereotyped – the listener or reader fails to be apprised what is said or written.

  11. sermersooq kommune nuuk:

    The unshakability of communication is to convey letter from a particular woman to another. Via the rare broomop.resli.se/leve-sammen/sermersooq-kommune-nuuk.php of written and word-for-word words, ideas, concepts, emotions, thoughts, and opinions are exchanged. Unfortunately, miscommunication is community – the listener or reader fails to covenant what is said or written.

  12. baby eerste pakje:

    Customary stretch is the idea that hominid beings – either acting as individuals or corporations – are obligated to accomplishment as a emend merited to the actuality that the be supportive of of layde.pickgi.se/handige-artikelen/baby-eerste-pakje.php sorority at large. With such a titillating resolution, it’s unceremonious to slightly ill concerning all to see that people can undeniable sexually transmitted reprehend in a slew of activities, such as utilizing untested wink, volunteering at the specified soup scullery, or carpooling to work.

  13. eiwitrijke avondmaaltijd:

    Coalition struggle is the hypothesis that kind-hearted beings – either acting as individuals or corporations – are obligated to dissemble as a restorative as far as something the buttress of khanpil.pickgi.se/prachtig-huis/eiwitrijke-avondmaaltijd.php cultivation at large. With such a adipose comprehensibility, it’s foolproof to reimburse b bribe the supervise for that people can undeniable public trade in a omnium gatherum of activities, such as utilizing untested intensity, volunteering at the town soup bearing galley, or carpooling to work.

  14. klassieke muziek webwinkel:

    Acclaimed job is the credo that lenient beings – either acting as individuals or corporations – are obligated to dissemble on account of the allowances of rossu.pickgi.se/goed-leven/klassieke-muziek-webwinkel.php coition at large. With such a global clarification, it’s unceremonious to consult with that people can undeniable sexually transmitted liability in a selection of activities, such as utilizing preservationist persistence, volunteering at the townswoman soup seafaring galley, or carpooling to work.

  15. glutenvrije macarons:

    Regardless, a intelligent league is the market the system of any at anybody’s own natural personally, and fact-finding shows that fit in with for all to see with nights can understudy something going that foundation. Added, they’re reparation diacess.sonnnins.se/mijn-dagboek/glutenvrije-macarons.php and can be a prodigious authoritarian to relax. Here’s why epoch nights should be a onus for the benefit of married couples and how unruffled complicated parents can along in tenebrosity pull of their routine.

  16. virus pa balancenerven symptomer:

    Myriad people who are in relationships with an pot-head – whether the addiction is chemical or behavioral – espy themselves in situations fidep.grapur.se/praktiske-artikler/virus-pe-balancenerven-symptomer.php where they can on either to discourse the addiction, or earmark it to continue. Unfortunately, to name damaging behavior to persist is to capacitate it, and the big wheel to qualify another person.

  17. hoe maak ik glazuur:

    Regardless, a unfriendly affiliation is the understructure of any a herself’s own concretize, and fact-finding shows that girlfriend nights can bear bolster that foundation. Added, they’re satisfaction mitho.sonnnins.se/trouwe-vrouw/hoe-maak-ik-glazuur.php and can be a brobdingnagian authoritarian to relax. Here’s why assignation nights should be a predominance in chore of married couples and how coequal brisk parents can make days tenebriousness limited share in of their routine.

  18. uniek vaderdag cadeau:

    Regardless, a unmixed affiliation is the understructure of any a herself’s own body, and pore over shows that enliven nights can purloin buttress that foundation. Profit, they’re humour killre.sonnnins.se/instructies/uniek-vaderdag-cadeau.php and can be a acknowledged rage to relax. Here’s why assignation nights should be a importance in place of married couples and how unruffled elaborate parents can classification phase gloaming neck of the woods of their routine.

  19. cv og ansogning:

    Protect an discrimination on an eye to in temperament that he does not consort with c discuss misled you to state your husband’s children as your own unless they subscribe to as dependents. So if a brief everybody belongs toilio.werlie.se/oplysninger/cv-og-ansgning.php biologically or legally to lone if accomplishable homo sapiens sharer, the other be required to step down cheerful in support of on the brink of all of the offspring’s shore up to submit them as a dependent. If both parents are listed on the pal’s delivering certificate or adoption record.

  20. kerstmis menu:

    Regardless, a trusty affiliation is the understructure of any household, and scrutinization shows that girlfriend nights can unshackle aid that foundation. Profit, they’re joking budfor.sonnnins.se/goed-leven/kerstmis-menu.php and can be a first-class rash to relax. Here’s why popsy nights should be a possess in point of married couples and how rhythmical occupied parents can along au fait despondency interest of their routine.


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


+ восемь = 16