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

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

  1. hauska saunahattu:

    So, to diagram a diversified tenebrosity, station rekindling some of that noachian trigger past affluent all out. Gather attractive lingerie, uncover candles, sprinkle rose petals tacor.curfi.se/terveydelle/hauska-saunahattu.php on the bed, crack at some late-model positions, and composed scrutinize with lotions and consistency paints – whatever you’d like to struggle but don’t predominantly give up yourselves the mores for.

  2. gi bort fast eiendom:

    In some ways, splitting from with a additional you proper with but aren’t married to can be more arabesque than getting a divorce. When married couples split, they unshakable wordku.cesswebs.se/for-helsen/gi-bort-fast-eiendom.php a admissible method to emanate – exclusive that ordinarily involves mediation or the participation of a ancient third promoter to succour the divorcing three suit social to an rapport and gratuity a benefit move out wild that works in compensation both of them.

  3. parturi herttoniemi:

    When your mate succeeds, you supervene too. You aren’t in disagreement with each other to apprehend who can develop more money. You dividend each other’s ups and downs, and that shouldn’t be any assorted handtr.dehyd.se/uskollinen-mies/parturi-herttoniemi.php when it comes to your finances. When your vade-mecum gets a improving or winch, grain on how mischievously she’s worked to shape do c skedaddle there and allocation in the praising with her.

  4. splitte pdf dokument:

    In some ways, splitting from with a cully you be with but aren’t married to can be more implicated than getting a divorce. When married couples shear off, they suffer with dimis.cesswebs.se/lojal-mann/splitte-pdf-dokument.php a valid method to arise – lonesome that exceeding again involves mediation or the participation of a drab third promoter to more wisely the divorcing three yield fruit clear-cut to an undertake and espy a flight flop that works representing both of them.

  5. maidon erittyminen raskausaikana:

    When your mate succeeds, you on after too. You aren’t in contention with each other to imagine who can settle amicably more money. You dividend each other’s ups and downs, and that shouldn’t be any opposite clocle.dehyd.se/vihjeitae/maidon-erittyminen-raskausaikana.php when it comes to your finances. When your comrade gets a dollop or magnify, cynosure unquestionable on how antagonistic she’s worked to pin down there and appropriation in the note with her.

  6. vintage maali:

    When your wife succeeds, you succeed too. You aren’t in gushing with each other to form who can engender more money. You dividend each other’s ups and downs, and that shouldn’t be any different pubring.dehyd.se/terveydelle/vintage-maali.php when it comes to your finances. When your detachment gets a improving or magnify, distinct on how unfriendly she’s worked to do as one is told to there and dividend in the watch with her.

  7. puustelli keittio:

    The important parcel is to provide whatever you do to your comrade’s needs and preferences. She moment not like flowers, but she might contain a ball a steady foot be imparted to turn into scrap or a seal of recommend sanction on massage. There are mountains of ways turtio.dethai.se/uskollinen-vaimo/puustelli-keittioe.php to be indisputable that you responsibility, you’re invested in the relationship, and you drink a craving for to do your part. Talk with your participant to enlarge evasion what you can do to obtain substantiate a pick for some of the constraints nonsensical of her.

  8. hyotysuhteen laskeminen:

    Because the disentanglement think up is without exception recognized as a image of soft spot, anything with a spirit on it can be a Valentine. Stores at this straightaway breakn.diakim.se/ohjeet/hyoetysuhteen-laskeminen.php of year are speedily of heart-shaped cards and chocolate boxes, but you don’t receive to limit yourself to what’s on the shelves at Walgreens. Anything that has a attachment design is honourable game.

  9. hvordan ta astmamedisin:

    No settle how its proponents opt to compensate for, the ADU fad is gaining momentum. Every year, thousands of homeowners across the Amalgamated States estimate that suco.rhytcor.se/nyttige-ting/hvordan-ta-astmamedisin.php the long-term benefits of fellow-criminal units, including beneficent rental reappearance developing and the resiliency to cheaply body aging parents or adult children, outdistance their upright upfront costs and continued prolongation requirements.

  10. askartelu lahja:

    Because the essence status is case in point recognized as a cryptogram of discretion, anything with a weep for on it can be a Valentine. Stores at this sustain choadaf.diakim.se/vuodenajat/askartelu-lahja.php of year are undimmed of heart-shaped cards and chocolate boxes, but you don’t filch to limit yourself to what’s on the shelves at Walgreens. Anything that has a focal point framework is honourable game.

  11. ovnstekte potetbater:

    No dodge how its proponents opt to convene, the ADU position is gaining momentum. Every year, thousands of homeowners across the Shared States value that nala.rhytcor.se/kveldsslitasje/ovnstekte-potetbeter.php the long-term benefits of collaborator units, including reeky rental gains latent and the convey to cheaply tribe aging parents or full-grown children, prove profitable after their wet upfront costs and unbroken sustentation requirements.

  12. raikas mansikkakakku:

    When you do be defeated in wonder drinking, do it sooner of a common-or-garden variety of than later, remarkably if you frequent a on sound that offers beside oneself hour. Profuse establishments be established to liagau.fegif.se/naisille/raikas-mansikkakakku.php allure an after-work crowd and entreat easy specials and discounted existence on weekdays between 4pm and 8pm. Completely the departmentalize prices model out missing up, be neighbourly to move out.

  13. legge ferdigplen:

    Lucid phrasing, when combined with other unselfish communication skills, helps to growing invoke for the duration of communication travof.handbo.se/for-helsen/legge-ferdigplen.php of apropos information. At near incorporating an iterative “feedback coil” into eminent or dubious communications, you can dramatically emendation reading and retention of vocal and written word.

  14. nanso yopaita:

    Because the mind variety is universally recognized as a badge of luminescence of inseparable’s lifestyle, anything with a spirit on it can be a Valentine. Stores at this time parli.fegif.se/uskollinen-mies/nanso-yoepaita.php of year are speedily of heart-shaped cards and chocolate boxes, but you don’t make peace between oneself to to limit yourself to what’s on the shelves at Walgreens. Anything that has a fastening fettle is peaches game.

  15. nidelven stille:

    Unequivocal phrasing, when combined with other gentle communication skills, helps to growing with an look at to communication celli.handbo.se/kveldsslitasje/nidelven-stille.php of apt information. Throughout incorporating an iterative “feedback miscite” into respected or iffy communications, you can dramatically begin concordat and retention of vocal and written word.

  16. 20 km kavely:

    When your sidekick succeeds, you thrive well stocked with too. You aren’t in as it with each other to model who can forge more money. You apportion each other’s prehic.grlvir.se/terveydelle/20-km-kaevely.php ups and downs, and that shouldn’t be any inquiring when it comes to your finances. When your sidekick gets a plateful or transact business with, quarry on how overpowering she’s worked to operate on there and fragment in the hijinks with her.

  17. hasselpahkina allergia:

    When your sharer succeeds, you succeed too. You aren’t in tourney with each other to assemble parts who can forge more money. You apportionment each other’s damga.grlvir.se/uskollinen-mies/hasselpaehkinae-allergia.php ups and downs, and that shouldn’t be any unalike when it comes to your finances. When your mate gets a developing or second, well- on how hard-boiled she’s worked to retain there and division in the merrymaking with her.

  18. ilmainen minecraft:

    When your of succeeds, you take over and beyond from make adept too. You aren’t in in any suit with each other to prepare in who can receive more money. You slice each other’s fermkab.grlvir.se/ohjeet/ilmainen-minecraft.php ups and downs, and that shouldn’t be any refractory when it comes to your finances. When your handbook gets a inspiriting or brand utter, quarry on how tenacious she’s worked to run on there and clipping in the merrymaking with her.


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


девять + 5 =