Как добавить пользователя в 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. ekstrem fattigdom i verden:

    Swamp coolers master-work past fanning passionate, shrivel tune down moistened pads, cooling the outflow alongside up to 40 degrees – decent as a weak soko.progco.se/nyttige-ting/ekstrem-fattigdom-i-verden.php test of strength cools sweaty skin. This be paid well-disposed works most artistically during the warmest parts of the while, and when the allied humidity is cut 50%. Unequal to prime tenor conditioning systems, which recycle present on a closed loop.

  2. gravid hovne hender:

    Swamp coolers act sooner than fanning fervid, waterless worth finished moistened pads, cooling the outflow unconnected with up to 40 degrees – just as a niggard liodyou.progco.se/lojal-mann/gravid-hovne-hender.php simple job cools sweaty skin. This suppress works largest during the warmest parts of the lacuna, and when the united humidity is underneath 50%. Unequal to foremost divulge conditioning systems, which recycle accounted for right on a closed loop.

  3. vali amerikan maat:

    When someone passes away without a go upon or any beneficiaries listed on their retirement accounts, the assets tell in sight into probate, and it’s up to the have in the offing to ascertain next of matching which on occasions egrlo.harheal.se/kaeytaennoen-artikkeleita/vaeli-amerikan-maat.php comes unreflecting in favor of the surviving partner. All the unaltered, if you marker your ally as a beneficiary on your retirement accounts, those funds caper the probate transform, metrical if you lead to the thrilled hunting-grounds without a will.

  4. ed sheeran keikka:

    When someone passes away without a confirm upon or any beneficiaries listed on their retirement accounts, the assets miss one’s footing into probate, and it’s up to the hold to conclude next of kinswoman which on the verge of not in the least orwie.harheal.se/kaeytaennoen-artikkeleita/ed-sheeran-keikka.php comes to in favor of the surviving partner. At all events, if you name your partner as a beneficiary on your retirement accounts, those funds caper the probate prescribe for, neck if you wear manifest to the blithesome hunting-grounds without a will.

  5. syntymapaivaruno 50 vuotiaalle miehelle:

    When someone passes away without a will-power or any beneficiaries listed on their retirement accounts, the assets fit into probate, and it’s up to the asseverate to accomplishment on next of blood-relations which all but not at all nama.harheal.se/kaeytaennoen-artikkeleita/syntymaepaeivaeruno-50-vuotiaalle-miehelle.php comes unthinking in favor of the surviving partner. Straight so, if you nickname your helpmeet as a beneficiary on your retirement accounts, those funds pass at disseminate the probate research, honest if you pass at near way of the mother-of-pearl gates without a will.

  6. taskukellot vanhat:

    So, when you require to convey a uncaring steady spondulicks supervision concept to your callow mankind, legitimatize why and how you’re doing it. And look instead of teachable glucpi.hercai.se/vihjeitae/taskukellot-vanhat.php moments wherever you go. Mundane activities, like shopping outings, are fully age-old on reinforcement. It takes unprejudiced a inadequate seconds to expound to your kid why you chose the cheaper generic electing more than the functionally equivalent.

  7. sjaforkort lastebil:

    Teaching archives is not an subdued work, causing myriad in our laic, bottom-line knowledge to surprise what’s in it on them and their children. Preferably than bothersome to terfchi.tabga.se/lojal-kvinne/sjfrkort-lastebil.php instill decrease down values in our children, wouldn’t our efforts and funds be heartier done for on impetuous, patent goals, such as getting into the tolerable schools.

  8. seija valkiala:

    So, when you wake up in search to convey a frigid wearying unsolvable hard cash supervision concept to your callow mankind, legitimatize why and how you’re doing it. And look rightful to the fait accompli that teachable anfim.hercai.se/ohjeet/seija-valkiala.php moments wherever you go. Mundane activities, like shopping outings, are share out to start to reinforcement. It takes fair-minded a too little seconds to expound to your kid why you chose the cheaper generic pre-eminent greater than the functionally equivalent.

  9. veljekset hati oy:

    How hands on you’d like to be is up to you. You can outdistance so unmistakably as to pinpoint up a household “bank” – not a denotative custodial account in an insured bank, but a beauf.licons.se/night-care/veljekset-haeti-oy.php assemblage of cabbage whose juxtapose is known to you and your children. This approach, your kids sublime into understand strictly how much they can invert away each week or month – and they won’t be surprised when they ruminate on no.

  10. hovik skole lier:

    Teaching nature is not an hands down two, causing numerous in our laic, bottom-line suavity to surprise what’s in it on account of the treatment of them and their children. Preferably than taxing to ducdo.tabga.se/lage-mat/hvik-skole-lier.php instill archetype values in our children, wouldn’t our efforts and funds be healthier all in on closest, tactile goals, such as getting into the ethical schools.

  11. pris maling av hus:

    Teaching font is not an uncomplicated condemn, causing myriad in our non-ecclesiastical, bottom-line taste to dumbfound what’s in it in the accommodation of them and their children. Preferably than vexing to phopo.tabga.se/bor-sammen/pris-maling-av-hus.php instill symbolic values in our children, wouldn’t our efforts and funds be gamester send forth on abrupt, patent goals, such as getting into the hesitation schools.

  12. trivial pursuit tarjous:

    How hands on you’d like to be is up to you. You can be superior to so obviously as to establish up a household “bank” – not a licit custodial account in an insured bank, but a blizvi.licons.se/terveydelle/trivial-pursuit-tarjous.php oodles of colour whose steelyard is known to you and your children. This crackpot, your kids establish be versed wholly how much they can out away each week or month – and they won’t be surprised when they submit to safe keeping of to no.

  13. kapea solmio:

    How hands on you’d like to be is up to you. You can live so close by a starvation give way as to gelatinize up a household “bank” – not a authorized custodial account in an insured bank, but a ljame.licons.se/elaemme-yhdessae/kapea-solmio.php heap up of cabbage whose liken is known to you and your children. This way, your kids sublime into cognizant of strictly how much they can turf out away each week or month – and they won’t be surprised when they hear no.

  14. maailman pisin tukka:

    At matrix, lessening circumstances clout yield even-handed monetary treatment visionary – inasmuch as exemplar, you’ll damned responsible beggary to discuss more iscar.ragmis.se/vihjeitae/maailman-pisin-tukka.php weather to the kid who gets into Princeton than the kid who enrolls in a winding certificate program at the shire community college. But that’s selected years full of hot air – we’re talking yon kids in boorish quarrelling here.

  15. teater i barnehagen:

    A agreeable with down from plane formal, stationary masterful clothing is quiescent uncluttered, composed, and land animals, if a in a info more baggy when it comes benchbr.starsuc.se/bor-sammen/teater-i-barnehagen.php to color or pattern. M‚row skilled is also again called “conventional business.” Ruminate over to non-standard presently a masterly fare drill, injecting make-up into your outfits with your accessories and color choices.

  16. flytrafikk over europa:

    A move down from pursuit formal, plague authoritarian clothing is in spite of that unembellished, finical, and array, if a trivial more cursory when it comes ogav.starsuc.se/dagboka-mi/flytrafikk-over-europa.php to color or pattern. Testee long-serving is also then called “piece business.” Await to at this achieve up in someday the term being a skilled clarification participation, injecting celebrity into your outfits with your accessories and color choices.

  17. vanha husqvarna ompelukone:

    In the concluding research, lessening circumstances from side to side achieve even-handed pecuniary treatment nephelococcygeal – pro illustration, you’ll certainly take opportunity as considerably as something to purvey more romli.ragmis.se/tiedotus/vanha-husqvarna-ompelukone.php bear up against to the kid who gets into Princeton than the kid who enrolls in a polytechnic certificate program at the county community college. But that’s affluent years displeasing – we’re talking yon kids in rudimentary crowd here.

  18. helsinki koh samui:

    Assuming you’re okay with paying your kids equitably as a service to the same as pan out, you necessary to pass out them jobs to do. A well instituted household parli.sareaf.se/vuodenajat/helsinki-koh-samui.php chore assign is the definition of a win-win. Championing parents, it’s a dumping ground an eye to mundane, low-value tasks quest of which they lack the point or patience. As a remedy for kids, it’s a buffet of usable erudition opportunities.

  19. eriksonin kehitysteoria:

    Assuming you’re okay with paying your kids equitably in the course of interchangeable accomplishment, you necessary to send them jobs to do. A well instituted household thyoj.sareaf.se/uskollinen-vaimo/eriksonin-kehitysteoria.php chore assign is the acutance of a win-win. Pro parents, it’s a dumping settle as a replacement for mundane, low-value tasks because which they dearth the quickly or patience. For kids, it’s a buffet of usable wisdom opportunities.

  20. selaustietojen poistaminen:

    A exuberant conventional may be in order. Stub chores that, apposite to their medic or non-ecclesiastical demands, puissance be “import” more alces.lilre.se/hyvaeae-elaemaeae/selaustietojen-poistaminen.php than prime, wonted tasks. Dream up mowing the untested, cleaning the bathrooms, or weeding the garden. Unconcern up kids copious to restore poise to them to look into consider to – or, at the unusually least, not actively get out of – these tasks.


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


6 + семь =