Last active
August 20, 2016 13:23
-
-
Save jklance/73479f4aac6b6b457870 to your computer and use it in GitHub Desktop.
Magento add admin user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCK TABLES | |
`admin_role` WRITE, | |
`admin_user` WRITE; | |
SET @SALT = "salt"; | |
SET @PASS = CONCAT(MD5(CONCAT( @SALT , "password") ), 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 | |
('Jer','Lance','[email protected]','jlance',@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 = 'jlance'),'Jer'); | |
UNLOCK TABLES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment