Skip to content

Commit

Permalink
Make token from license password and login
Browse files Browse the repository at this point in the history
  • Loading branch information
budziam committed Oct 23, 2018
1 parent 46bcb10 commit 01e518a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions install/migrations/2018_10_21_205300_add_shop_name.sql
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
INSERT INTO `ss_settings` (`key`, `value`) VALUES ('shop_name', '');
UPDATE `ss_settings`
SET `value` =(
CASE
WHEN (SELECT COUNT(*) FROM (SELECT * FROM `ss_settings`) as a WHERE `key` = 'license_login' AND `value` = 'license') > 0 THEN `value`
ELSE SHA1(CONCAT((SELECT `value` FROM (SELECT * FROM `ss_settings`) as b WHERE `key` = 'license_login'), '#', (SELECT `value` FROM (SELECT * FROM `ss_settings`) as c WHERE `key` = 'license_password')))
END
)
WHERE `key` = 'license_password';
UPDATE `ss_settings` SET `value` = 'license' WHERE `key` = 'license_login';

0 comments on commit 01e518a

Please sign in to comment.