forked from Joomline/slogin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.php
More file actions
31 lines (26 loc) · 732 Bytes
/
script.php
File metadata and controls
31 lines (26 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* SLogin
*
* @version 2.9.1
* @author Arkadiy, Joomline
* @copyright © 2012-2020. All rights reserved.
* @license GNU/GPL v.3 or later.
*/
// no direct access
defined('_JEXEC') or die ;
class pkg_sloginInstallerScript
{
public function postflight($type, $parent)
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->update('`#__extensions`')
->set('`enabled` = 1')
->where('`element` = '.$db->quote('slogin'))
->where('`type` = '.$db->quote('plugin'))
->where('(`folder` = '.$db->quote('authentication').' OR `folder` = '.$db->quote('user').')')
;
$db->setQuery($query)->execute();
}
}