Sometimes, we as developer required to extend Joomla function that another extend that what they provide required modification. Below I show how to update your own sql to change user type based on Joomla setting.
SELECT *
FROM `jos_core_acl_aro`
INNER JOIN `jos_core_acl_groups_aro_map` ON `jos_core_acl_aro`.`id` = `jos_core_acl_groups_aro_map`.`aro_id`
INNER JOIN `jos_users` ON `jos_users`.`id` = `jos_core_acl_aro`.`value`
WHERE `jos_users`.`id` LIKE '87'
You only need to change data in `jos_user`.`usertype` to 'Editor' and jos_core_acl_groups_aro_map`.`group_id` to '20'
UPDATE `jos_core_acl_groups_aro_map`,`jos_core_acl_aro`,`jos_users`
SET `jos_core_acl_groups_aro_map`.`group_id` = 20, `jos_users`.`usertype` = 'Editor'
WHERE 1
AND `jos_core_acl_aro`.`id` = `jos_core_acl_groups_aro_map`.`aro_id`
AND `jos_users`.`id` = `jos_core_acl_aro`.`value`
AND `jos_users`.`id` LIKE '87'
that all guys...happy generating money using joomla. :-)
Tiada ulasan:
Catat Ulasan
Please comment, if you think it will help us all.