witam
mam jedynie dostep do FTP i do directadmin
prosze o pomoc
czy ten skrypt bedzie dzialac?
<?php
require_once 'app/Mage.php';
$app=Mage::app();
# Create New User
try {
$user = Mage::getModel('admin/user')
->setData(array(
'username' => '123456',
'firstname' => '123456',
'lastname' => '123456',
'email' => 'twoj@adres-email.pl',
'password' => '123456',
'is_active' => 1
))->save();
} catch (Exception $e) {
echo $e->getMessage();
exit;
}
# Assign New Role
try {
$user->setRoleIds(array(1))
->setRoleUserId($user->getUserId())
->saveRelations();
} catch (Exception $e) {
echo $e->getMessage();
exit;
}
?>