Magento 1 : Menambahkan Role Admin Melalui Database

Magento 1 : Menambahkan Role Admin Melalui Database

Menambahkan Role Admin melalui database pada Magento 1 :
LOCK TABLES `admin_role` WRITE,
`admin_user` WRITE;

SET @SALT = "rp";

SET @PASS = CONCAT( MD5( CONCAT( @SALT, "admin12345" ) ), CONCAT( ":", @SALT ) );
SELECT
    @EXTRA := MAX( extra ) 
FROM
    admin_user 
WHERE
    extra IS NOT NULL;
INSERT INTO `admin_user` ( firstname, lastname, email, username, PASSWORD, created, lognum, reload_acl_flag, is_active, extra, rp_token_created_at )
VALUES
    (
        'Andhi',
        'Irawan',
        'andhiirawan@gmail.com',
        'admin',
        @PASS,
        NOW( ),
        0,
        0,
        1,
        @EXTRA,
        NOW( ) 
    );
INSERT INTO `admin_role` ( parent_id, tree_level, sort_order, role_type, user_id, role_name )
VALUES
    ( 1, 2, 0, 'U', ( SELECT user_id FROM admin_user WHERE username = 'admin' ), 'Andhi' );
UNLOCK TABLES;

About air

Periksa Juga

Magento 2 : Media URL di Statik Blok

Magento 2 : Media URL di Statik Blok

Media URL di Statik Blok Magento 2

Leave a Reply

Your email address will not be published. Required fields are marked *