Skip to content

Commit

Permalink
Uninstall tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveM2011 committed Sep 1, 2018
1 parent 7f0ddc9 commit de5268d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg_script.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function postflight($route, JAdapterInstance $adapter)
*/
public function install(JAdapterInstance $adapter)
{
$db = JFactory::getDbo();
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->update('#__extensions');
$query->set($db->qn('enabled') . ' = ' . $db->q(1));
Expand All @@ -57,7 +57,15 @@ public function install(JAdapterInstance $adapter)
*/
public function uninstall(JAdapterInstance $adapter)
{

$db = JFactory::getDbo();
$query = $db->getQuery(true);
$conditions = array(
$db->quoteName('profile_key') . ' = ' . $db->quote('profile.HydroRaindropToken')
);
$query->delete($db->quoteName('#__user_profiles'));
$query->where($conditions);
$db->setQuery($query);
$db->execute();
return true;
}
}

0 comments on commit de5268d

Please sign in to comment.