Version Notes
* Magento CE 1.9 and EE 1.14 compatibility
* New feature to track admin logins
* Added compatibility observers for thirtparty module developers
! Fixed the issue with old session data merging
Download this release
Release Info
Developer | Yury Ksenevich |
Extension | SpadarLogin |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.1.0
- app/code/community/Widgento/Core/Helper/Data.php +3 -3
- app/code/community/Widgento/Core/Model/Feed.php +3 -3
- app/code/community/Widgento/Core/Model/Uninstall/Abstract.php +3 -3
- app/code/community/Widgento/Core/controllers/Adminhtml/RewriteController.php +3 -3
- app/code/community/Widgento/Core/etc/config.xml +3 -3
- app/code/community/Widgento/Core/etc/manifest.xml +3 -3
- app/code/community/Widgento/Core/etc/system.xml +30 -0
- app/code/community/Widgento/Login/Block/Adminhtml/Log.php +40 -0
- app/code/community/Widgento/Login/Block/Adminhtml/Log/Grid.php +107 -0
- app/code/community/Widgento/Login/Helper/Button.php +8 -2
- app/code/community/Widgento/Login/Helper/Data.php +11 -1
- app/code/community/Widgento/Login/Model/Login.php +1 -1
- app/code/community/Widgento/Login/Model/Mysql4/Login.php +1 -1
- app/code/community/Widgento/Login/Model/Mysql4/Login/Collection.php +74 -0
- app/code/community/Widgento/Login/Model/Uninstall.php +1 -1
- app/code/community/Widgento/Login/controllers/Adminhtml/IndexController.php +11 -2
- app/code/community/Widgento/Login/controllers/Adminhtml/LogController.php +59 -0
- app/code/community/Widgento/Login/controllers/IndexController.php +47 -8
- app/code/community/Widgento/Login/etc/config.xml +30 -13
- app/code/community/Widgento/Login/etc/manifest.xml +1 -1
- app/code/community/Widgento/Login/etc/system.xml +24 -10
- app/code/community/Widgento/Login/sql/{widgentologin_setup/mysql4-upgrade-1.0.1.php → widgento_login_setup/mysql4-install-1.1.0.php} +12 -1
- app/code/community/Widgento/Login/sql/widgentologin_setup/mysql4-install-0.1.0.php +0 -49
- app/code/community/Widgento/Login/sql/widgentologin_setup/mysql4-install-1.0.1.php +0 -40
- app/design/adminhtml/default/default/layout/widgentologin.xml +13 -2
- app/etc/modules/Spadar_Login.xml +1 -1
- app/etc/modules/Widgento_Core.xml +3 -3
- app/etc/modules/Widgento_Login.xml +1 -1
- app/locale/de_DE/Widgento_Login.csv +10 -1
- app/locale/en_US/Widgento_Login.csv +10 -1
- package.xml +9 -6
- shell/widgento_uninstall.php +3 -3
app/code/community/Widgento/Core/Helper/Data.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
@@ -10,10 +10,10 @@
|
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
*
|
12 |
* @category Widgento
|
13 |
-
* @package
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Widgento_Login
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
*
|
12 |
* @category Widgento
|
13 |
+
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
app/code/community/Widgento/Core/Model/Feed.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
@@ -10,10 +10,10 @@
|
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
*
|
12 |
* @category Widgento
|
13 |
-
* @package
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Widgento_Login
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
*
|
12 |
* @category Widgento
|
13 |
+
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
app/code/community/Widgento/Core/Model/Uninstall/Abstract.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
@@ -10,10 +10,10 @@
|
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
*
|
12 |
* @category Widgento
|
13 |
-
* @package
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Widgento_Login
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
*
|
12 |
* @category Widgento
|
13 |
+
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
app/code/community/Widgento/Core/controllers/Adminhtml/RewriteController.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
@@ -10,10 +10,10 @@
|
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
*
|
12 |
* @category Widgento
|
13 |
-
* @package
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Widgento_Login
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
*
|
12 |
* @category Widgento
|
13 |
+
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
app/code/community/Widgento/Core/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<!--
|
3 |
|
4 |
/**
|
5 |
-
*
|
6 |
*
|
7 |
* NOTICE OF LICENSE
|
8 |
*
|
@@ -11,10 +11,10 @@
|
|
11 |
* http://opensource.org/licenses/osl-3.0.php
|
12 |
*
|
13 |
* @category Widgento
|
14 |
-
* @package
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
-
* @license http://
|
18 |
*/
|
19 |
|
20 |
|
2 |
<!--
|
3 |
|
4 |
/**
|
5 |
+
* Widgento_Login
|
6 |
*
|
7 |
* NOTICE OF LICENSE
|
8 |
*
|
11 |
* http://opensource.org/licenses/osl-3.0.php
|
12 |
*
|
13 |
* @category Widgento
|
14 |
+
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
18 |
*/
|
19 |
|
20 |
|
app/code/community/Widgento/Core/etc/manifest.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<!--
|
3 |
|
4 |
/**
|
5 |
-
*
|
6 |
*
|
7 |
* NOTICE OF LICENSE
|
8 |
*
|
@@ -11,10 +11,10 @@
|
|
11 |
* http://opensource.org/licenses/osl-3.0.php
|
12 |
*
|
13 |
* @category Widgento
|
14 |
-
* @package
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
-
* @license http://
|
18 |
*/
|
19 |
|
20 |
|
2 |
<!--
|
3 |
|
4 |
/**
|
5 |
+
* Widgento_Login
|
6 |
*
|
7 |
* NOTICE OF LICENSE
|
8 |
*
|
11 |
* http://opensource.org/licenses/osl-3.0.php
|
12 |
*
|
13 |
* @category Widgento
|
14 |
+
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
18 |
*/
|
19 |
|
20 |
|
app/code/community/Widgento/Core/etc/system.xml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Widgento_Login
|
6 |
+
*
|
7 |
+
* NOTICE OF LICENSE
|
8 |
+
*
|
9 |
+
* This source file is subject to the Open Software License (OSL 3.0), a
|
10 |
+
* copy of which is available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @category Widgento
|
14 |
+
* @package Widgento_Login
|
15 |
+
* @author Yury Ksenevich <info@widgento.com>
|
16 |
+
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
18 |
+
*/
|
19 |
+
|
20 |
+
|
21 |
+
-->
|
22 |
+
|
23 |
+
<config>
|
24 |
+
<tabs>
|
25 |
+
<widgento translate="label">
|
26 |
+
<label>Widgento Modules</label>
|
27 |
+
<sort_order>199</sort_order>
|
28 |
+
</widgento>
|
29 |
+
</tabs>
|
30 |
+
</config>
|
app/code/community/Widgento/Login/Block/Adminhtml/Log.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Widgento_Login
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0), a
|
9 |
+
* copy of which is available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Widgento
|
13 |
+
* @package Widgento_Login
|
14 |
+
* @author Yury Ksenevich <info@widgento.com>
|
15 |
+
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
+
*/
|
18 |
+
|
19 |
+
|
20 |
+
?><?php
|
21 |
+
|
22 |
+
class Widgento_Login_Block_Adminhtml_Log extends Mage_Adminhtml_Block_Widget_Grid_Container
|
23 |
+
{
|
24 |
+
public function __construct()
|
25 |
+
{
|
26 |
+
$this->_blockGroup = 'widgentologin';
|
27 |
+
$this->_controller = 'adminhtml_log';
|
28 |
+
$this->_headerText = Mage::helper('widgentologin')->__('Login as Customer Logs');
|
29 |
+
|
30 |
+
parent::__construct();
|
31 |
+
|
32 |
+
$this->_removeButton('add');
|
33 |
+
$this->_addButton('flush', array(
|
34 |
+
'label' => Mage::helper('widgentologin')->__('Clear Logs'),
|
35 |
+
'onclick' => 'setLocation(\'' . $this->getUrl('widgentologinadmin/log/clear') .'\')',
|
36 |
+
'class' => 'delete',
|
37 |
+
));
|
38 |
+
|
39 |
+
}
|
40 |
+
}
|
app/code/community/Widgento/Login/Block/Adminhtml/Log/Grid.php
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Widgento_Login
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0), a
|
9 |
+
* copy of which is available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Widgento
|
13 |
+
* @package Widgento_Login
|
14 |
+
* @author Yury Ksenevich <info@widgento.com>
|
15 |
+
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
+
*/
|
18 |
+
|
19 |
+
|
20 |
+
?><?php
|
21 |
+
|
22 |
+
class Widgento_Login_Block_Adminhtml_Log_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
23 |
+
{
|
24 |
+
public function __construct()
|
25 |
+
{
|
26 |
+
parent::__construct();
|
27 |
+
$this->setId('widgentologin_log_grid');
|
28 |
+
$this->setUseAjax(true);
|
29 |
+
$this->setDefaultSort('created_at');
|
30 |
+
$this->setDefaultDir('DESC');
|
31 |
+
$this->setSaveParametersInSession(true);
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function _prepareCollection()
|
35 |
+
{
|
36 |
+
$logs = Mage::getModel('widgentologin/login')->getCollection()
|
37 |
+
->prepareColumns()
|
38 |
+
->joinCustomers()
|
39 |
+
->joinAdmins();
|
40 |
+
|
41 |
+
$this->setCollection($logs);
|
42 |
+
|
43 |
+
return parent::_prepareCollection();
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function _prepareColumns()
|
47 |
+
{
|
48 |
+
$this->addColumn('created_at', array(
|
49 |
+
'header' => Mage::helper('widgentologin')->__('Login Date'),
|
50 |
+
'index' => 'created_at',
|
51 |
+
'type' => 'datetime',
|
52 |
+
'width' => '160px',
|
53 |
+
));
|
54 |
+
|
55 |
+
$this->addColumn('username', array(
|
56 |
+
'header'=> Mage::helper('widgentologin')->__('Admin Username'),
|
57 |
+
'type' => 'text',
|
58 |
+
'index' => 'username',
|
59 |
+
));
|
60 |
+
|
61 |
+
$this->addColumn('store_id', array(
|
62 |
+
'header' => Mage::helper('widgentologin')->__('Login Store'),
|
63 |
+
'index' => 'main_table.store_id',
|
64 |
+
'type' => 'store',
|
65 |
+
'store_view' => true,
|
66 |
+
'display_deleted' => true,
|
67 |
+
));
|
68 |
+
|
69 |
+
$this->addColumn('email', array(
|
70 |
+
'header' => Mage::helper('widgentologin')->__('Customer Email'),
|
71 |
+
'index' => 'customer.email',
|
72 |
+
));
|
73 |
+
|
74 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
75 |
+
$this->addColumn('action',
|
76 |
+
array(
|
77 |
+
'header' => Mage::helper('sales')->__('Action'),
|
78 |
+
'width' => '100px',
|
79 |
+
'type' => 'action',
|
80 |
+
'getter' => 'getCustomerId',
|
81 |
+
'actions' => array(
|
82 |
+
array(
|
83 |
+
'caption' => Mage::helper('widgentologin')->__('View Customer'),
|
84 |
+
'url' => array('base'=>'adminhtml/customer/edit'),
|
85 |
+
'field' => 'id'
|
86 |
+
)
|
87 |
+
),
|
88 |
+
'filter' => false,
|
89 |
+
'sortable' => false,
|
90 |
+
'index' => 'stores',
|
91 |
+
'is_system' => true,
|
92 |
+
));
|
93 |
+
}
|
94 |
+
|
95 |
+
return parent::_prepareColumns();
|
96 |
+
}
|
97 |
+
|
98 |
+
public function getRowUrl($item)
|
99 |
+
{
|
100 |
+
return $this->getUrl('adminhtml/customer/edit', array('id' => $item->getCustomerId()));
|
101 |
+
}
|
102 |
+
|
103 |
+
public function getGridUrl()
|
104 |
+
{
|
105 |
+
return $this->getUrl('*/*/grid', array('_current' => true));
|
106 |
+
}
|
107 |
+
}
|
app/code/community/Widgento/Login/Helper/Button.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
@@ -55,7 +55,13 @@ class Widgento_Login_Helper_Button extends Mage_Core_Helper_Abstract
|
|
55 |
/* @var $adminSession Mage_Admin_Model_Session */
|
56 |
$adminSession = Mage::getSingleton('admin/session');
|
57 |
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
{
|
60 |
return 'hidden';
|
61 |
}
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
55 |
/* @var $adminSession Mage_Admin_Model_Session */
|
56 |
$adminSession = Mage::getSingleton('admin/session');
|
57 |
|
58 |
+
$transport = new Varien_Object(array('disable' => false));
|
59 |
+
Mage::dispatchEvent('widgentologin_disable', array(
|
60 |
+
'transport' => $transport,
|
61 |
+
'customer_id' => $this->_getCustomerId(),
|
62 |
+
));
|
63 |
+
|
64 |
+
if (!$adminSession->isAllowed('system/config/widgentologin') || !Mage::helper('widgentologin')->getCustomerStoreId($this->_getCustomerId()) || $transport->getDisable())
|
65 |
{
|
66 |
return 'hidden';
|
67 |
}
|
app/code/community/Widgento/Login/Helper/Data.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
@@ -58,4 +58,14 @@ class Widgento_Login_Helper_Data extends Mage_Core_Helper_Abstract
|
|
58 |
return Mage::app()->getDefaultStoreView()->getId();
|
59 |
}
|
60 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
58 |
return Mage::app()->getDefaultStoreView()->getId();
|
59 |
}
|
60 |
}
|
61 |
+
|
62 |
+
public function isSaveLogs()
|
63 |
+
{
|
64 |
+
return Mage::getStoreConfig('widgentologin/general/save_logs');
|
65 |
+
}
|
66 |
+
|
67 |
+
public function isOrderViewDisplayButton()
|
68 |
+
{
|
69 |
+
return Mage::getStoreConfig('widgentologin/general/order_view_display');
|
70 |
+
}
|
71 |
}
|
app/code/community/Widgento/Login/Model/Login.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
app/code/community/Widgento/Login/Model/Mysql4/Login.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
app/code/community/Widgento/Login/Model/Mysql4/Login/Collection.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Widgento_Login
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0), a
|
9 |
+
* copy of which is available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Widgento
|
13 |
+
* @package Widgento_Login
|
14 |
+
* @author Yury Ksenevich <info@widgento.com>
|
15 |
+
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
+
*/
|
18 |
+
|
19 |
+
|
20 |
+
?><?php
|
21 |
+
|
22 |
+
class Widgento_Login_Model_Mysql4_Login_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
23 |
+
{
|
24 |
+
protected $_storeId;
|
25 |
+
|
26 |
+
public function _construct()
|
27 |
+
{
|
28 |
+
$this->_init('widgentologin/login');
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @param int $storeId
|
33 |
+
* @return Widgento_Login_Model_Mysql4_Login_Collection
|
34 |
+
*/
|
35 |
+
public function setStoreId($storeId)
|
36 |
+
{
|
37 |
+
$this->_storeId = $storeId;
|
38 |
+
|
39 |
+
return $this;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @return Widgento_Login_Model_Mysql4_Login_Collection
|
44 |
+
*/
|
45 |
+
public function joinCustomers()
|
46 |
+
{
|
47 |
+
$this->getSelect()
|
48 |
+
->joinLeft(array('customer' => $this->getTable('customer/entity')), 'customer.entity_id = main_table.customer_id', array('customer.email' => 'email'));
|
49 |
+
|
50 |
+
return $this;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @return Widgento_Login_Model_Mysql4_Login_Collection
|
55 |
+
*/
|
56 |
+
public function prepareColumns()
|
57 |
+
{
|
58 |
+
$this->getSelect()
|
59 |
+
->columns(array('main_table.store_id' => 'store_id'));
|
60 |
+
|
61 |
+
return $this;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @return Widgento_Login_Model_Mysql4_Login_Collection
|
66 |
+
*/
|
67 |
+
public function joinAdmins()
|
68 |
+
{
|
69 |
+
$this->getSelect()
|
70 |
+
->joinLeft(array('admin' => $this->getTable('admin/user')), 'admin.user_id = main_table.admin_id', array('username' => 'admin.username'));
|
71 |
+
|
72 |
+
return $this;
|
73 |
+
}
|
74 |
+
}
|
app/code/community/Widgento/Login/Model/Uninstall.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
app/code/community/Widgento/Login/controllers/Adminhtml/IndexController.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
@@ -28,7 +28,13 @@ class Widgento_Login_Adminhtml_IndexController extends Mage_Adminhtml_Controller
|
|
28 |
$customerId = $this->getRequest()->getParam('id');
|
29 |
$customer = Mage::getModel('customer/customer')->load($customerId);
|
30 |
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
{
|
33 |
return $this->_redirect('admin/');
|
34 |
}
|
@@ -37,6 +43,9 @@ class Widgento_Login_Adminhtml_IndexController extends Mage_Adminhtml_Controller
|
|
37 |
$login = Mage::getModel('widgentologin/login')
|
38 |
->setLoginHash($hash)
|
39 |
->setCustomerId($customerId)
|
|
|
|
|
|
|
40 |
->save();
|
41 |
|
42 |
return $this->_redirect('widgentologin/', array(
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
28 |
$customerId = $this->getRequest()->getParam('id');
|
29 |
$customer = Mage::getModel('customer/customer')->load($customerId);
|
30 |
|
31 |
+
$transport = new Varien_Object(array('disable' => false));
|
32 |
+
Mage::dispatchEvent('widgentologin_disable', array(
|
33 |
+
'transport' => $transport,
|
34 |
+
'customer_id' => $customerId,
|
35 |
+
));
|
36 |
+
|
37 |
+
if (!$adminSession->isAllowed('system/config/widgentologin') || !$customer->getId() || $transport->getDisable())
|
38 |
{
|
39 |
return $this->_redirect('admin/');
|
40 |
}
|
43 |
$login = Mage::getModel('widgentologin/login')
|
44 |
->setLoginHash($hash)
|
45 |
->setCustomerId($customerId)
|
46 |
+
->setAdminId(Mage::getSingleton('admin/session')->getUser()->getId())
|
47 |
+
->setCreatedAt(now())
|
48 |
+
->setIsActive(1)
|
49 |
->save();
|
50 |
|
51 |
return $this->_redirect('widgentologin/', array(
|
app/code/community/Widgento/Login/controllers/Adminhtml/LogController.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Widgento_Login
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0), a
|
9 |
+
* copy of which is available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Widgento
|
13 |
+
* @package Widgento_Login
|
14 |
+
* @author Yury Ksenevich <info@widgento.com>
|
15 |
+
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
+
*/
|
18 |
+
|
19 |
+
|
20 |
+
?><?php
|
21 |
+
|
22 |
+
class Widgento_Login_Adminhtml_LogController extends Mage_Adminhtml_Controller_Action
|
23 |
+
{
|
24 |
+
protected function _initAction()
|
25 |
+
{
|
26 |
+
$this->loadLayout()
|
27 |
+
->_setActiveMenu('customer/widgentologin')
|
28 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Customers'), Mage::helper('adminhtml')->__('Customers'))
|
29 |
+
;
|
30 |
+
|
31 |
+
return $this;
|
32 |
+
}
|
33 |
+
|
34 |
+
public function indexAction()
|
35 |
+
{
|
36 |
+
$this->loadLayout()
|
37 |
+
->renderLayout();
|
38 |
+
}
|
39 |
+
|
40 |
+
public function _isAllowed()
|
41 |
+
{
|
42 |
+
return Mage::getSingleton('admin/session')->isAllowed('system/config/widgentologin');
|
43 |
+
}
|
44 |
+
|
45 |
+
public function gridAction()
|
46 |
+
{
|
47 |
+
$this->loadLayout(false);
|
48 |
+
$this->renderLayout();
|
49 |
+
}
|
50 |
+
|
51 |
+
public function clearAction()
|
52 |
+
{
|
53 |
+
Mage::getModel('widgentologin/login')->truncate();
|
54 |
+
|
55 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('Log has been cleared successfully.');
|
56 |
+
|
57 |
+
$this->_redirect('*/*/index');
|
58 |
+
}
|
59 |
+
}
|
app/code/community/Widgento/Login/controllers/IndexController.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
@@ -23,25 +23,64 @@ class Widgento_Login_IndexController extends Mage_Core_Controller_Front_Action
|
|
23 |
{
|
24 |
public function indexAction()
|
25 |
{
|
26 |
-
$hash
|
27 |
-
$login
|
|
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
if ($login->getCustomerId())
|
32 |
{
|
33 |
/* @var $customerSession Mage_Customer_Model_Session */
|
34 |
$customerSession = Mage::getSingleton('customer/session');
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
if (method_exists($customerSession, 'renewSession'))
|
37 |
{
|
38 |
-
$customerSession->renewSession();
|
39 |
}
|
40 |
else // for 1.4
|
41 |
{
|
42 |
-
$customerSession->logout();
|
43 |
}
|
44 |
-
|
45 |
$customerSession->loginById($login->getCustomerId());
|
46 |
|
47 |
return $this->_redirect('customer/account/');
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
23 |
{
|
24 |
public function indexAction()
|
25 |
{
|
26 |
+
$hash = $this->getRequest()->getParam('id');
|
27 |
+
$login = Mage::getModel('widgentologin/login')->load($hash, 'login_hash');
|
28 |
+
$isActive = $login->getIsActive();
|
29 |
|
30 |
+
if (!Mage::helper('widgentologin')->isSaveLogs())
|
31 |
+
{
|
32 |
+
$login->truncate();
|
33 |
+
}
|
34 |
+
else
|
35 |
+
{
|
36 |
+
$login
|
37 |
+
->setStoreId(Mage::app()->getStore()->getId())
|
38 |
+
->setLoginHash('')
|
39 |
+
->setIsActive(0)
|
40 |
+
->save();
|
41 |
+
}
|
42 |
|
43 |
+
if ($isActive && $login->getCustomerId())
|
44 |
{
|
45 |
/* @var $customerSession Mage_Customer_Model_Session */
|
46 |
$customerSession = Mage::getSingleton('customer/session');
|
47 |
|
48 |
+
Mage::dispatchEvent('widgentologin_before_login');
|
49 |
+
|
50 |
+
Mage::getSingleton('checkout/session')->clear();
|
51 |
+
Mage::getSingleton('catalog/session')->clear();
|
52 |
+
Mage::getSingleton('core/session')->clear();
|
53 |
+
Mage::getSingleton('customer/session')->clear();
|
54 |
+
Mage::getSingleton('newsletter/session')->clear();
|
55 |
+
Mage::getSingleton('paypal/session')->clear();
|
56 |
+
Mage::getSingleton('paypal/session')->clear();
|
57 |
+
Mage::getSingleton('reports/session')->clear();
|
58 |
+
Mage::getSingleton('review/session')->clear();
|
59 |
+
Mage::getSingleton('wishlist/session')->clear();
|
60 |
+
Mage::getSingleton('catalogsearch/session')->clear();
|
61 |
+
Mage::getSingleton('paypaluk/session')->clear();
|
62 |
+
|
63 |
+
if ($customerSession->getCustomerId())
|
64 |
+
{
|
65 |
+
$persistentSession = Mage::getSingleton('persistent/session');
|
66 |
+
|
67 |
+
if ($persistentSession)
|
68 |
+
{
|
69 |
+
$persistentSession
|
70 |
+
->clear()
|
71 |
+
->deleteByCustomerId($customerSession->getCustomerId());
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
if (method_exists($customerSession, 'renewSession'))
|
76 |
{
|
77 |
+
$customerSession->renewSession();
|
78 |
}
|
79 |
else // for 1.4
|
80 |
{
|
81 |
+
$customerSession->logout();
|
82 |
}
|
83 |
+
|
84 |
$customerSession->loginById($login->getCustomerId());
|
85 |
|
86 |
return $this->_redirect('customer/account/');
|
app/code/community/Widgento/Login/etc/config.xml
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
-
* @license http://
|
18 |
*/
|
19 |
|
20 |
|
@@ -23,7 +23,7 @@
|
|
23 |
<config>
|
24 |
<modules>
|
25 |
<Widgento_Login>
|
26 |
-
<version>1.0
|
27 |
</Widgento_Login>
|
28 |
</modules>
|
29 |
|
@@ -56,14 +56,14 @@
|
|
56 |
</helpers>
|
57 |
|
58 |
<resources>
|
59 |
-
<
|
60 |
<setup>
|
61 |
<module>Widgento_Login</module>
|
62 |
</setup>
|
63 |
<connection>
|
64 |
<use>core_setup</use>
|
65 |
</connection>
|
66 |
-
</
|
67 |
<widgentologin_write>
|
68 |
<connection>
|
69 |
<use>core_write</use>
|
@@ -122,17 +122,33 @@
|
|
122 |
<resources>
|
123 |
<admin>
|
124 |
<children>
|
125 |
-
<
|
126 |
<children>
|
127 |
-
<
|
128 |
-
<
|
129 |
-
|
|
|
|
|
|
|
|
|
130 |
</children>
|
131 |
-
</
|
132 |
</children>
|
133 |
</admin>
|
134 |
</resources>
|
135 |
</acl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
</adminhtml>
|
137 |
|
138 |
<frontend>
|
@@ -148,10 +164,11 @@
|
|
148 |
</frontend>
|
149 |
|
150 |
<default>
|
151 |
-
<
|
152 |
-
<
|
153 |
<order_view_display>1</order_view_display>
|
154 |
-
|
155 |
-
|
|
|
156 |
</default>
|
157 |
</config>
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
18 |
*/
|
19 |
|
20 |
|
23 |
<config>
|
24 |
<modules>
|
25 |
<Widgento_Login>
|
26 |
+
<version>1.1.0</version>
|
27 |
</Widgento_Login>
|
28 |
</modules>
|
29 |
|
56 |
</helpers>
|
57 |
|
58 |
<resources>
|
59 |
+
<widgento_login_setup>
|
60 |
<setup>
|
61 |
<module>Widgento_Login</module>
|
62 |
</setup>
|
63 |
<connection>
|
64 |
<use>core_setup</use>
|
65 |
</connection>
|
66 |
+
</widgento_login_setup>
|
67 |
<widgentologin_write>
|
68 |
<connection>
|
69 |
<use>core_write</use>
|
122 |
<resources>
|
123 |
<admin>
|
124 |
<children>
|
125 |
+
<system>
|
126 |
<children>
|
127 |
+
<config>
|
128 |
+
<children>
|
129 |
+
<widgentologin>
|
130 |
+
<title>Login as Customer</title>
|
131 |
+
</widgentologin>
|
132 |
+
</children>
|
133 |
+
</config>
|
134 |
</children>
|
135 |
+
</system>
|
136 |
</children>
|
137 |
</admin>
|
138 |
</resources>
|
139 |
</acl>
|
140 |
+
|
141 |
+
<menu>
|
142 |
+
<customer>
|
143 |
+
<children>
|
144 |
+
<widgentologin translate="title" module="widgentologin">
|
145 |
+
<title>Login as Customer Logs</title>
|
146 |
+
<action>widgentologinadmin/log/index</action>
|
147 |
+
<sort_order>200</sort_order>
|
148 |
+
</widgentologin>
|
149 |
+
</children>
|
150 |
+
</customer>
|
151 |
+
</menu>
|
152 |
</adminhtml>
|
153 |
|
154 |
<frontend>
|
164 |
</frontend>
|
165 |
|
166 |
<default>
|
167 |
+
<widgentologin>
|
168 |
+
<general>
|
169 |
<order_view_display>1</order_view_display>
|
170 |
+
<save_logs>1</save_logs>
|
171 |
+
</general>
|
172 |
+
</widgentologin>
|
173 |
</default>
|
174 |
</config>
|
app/code/community/Widgento/Login/etc/manifest.xml
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
-
* @license http://
|
18 |
*/
|
19 |
|
20 |
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
18 |
*/
|
19 |
|
20 |
|
app/code/community/Widgento/Login/etc/system.xml
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
-
* @license http://
|
18 |
*/
|
19 |
|
20 |
|
@@ -22,16 +22,22 @@
|
|
22 |
|
23 |
<config>
|
24 |
<sections>
|
25 |
-
<
|
26 |
-
<tab>
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
<groups>
|
28 |
-
<
|
29 |
-
<label>
|
|
|
30 |
<frontend_type>text</frontend_type>
|
31 |
-
<sort_order>200</sort_order>
|
32 |
<show_in_default>1</show_in_default>
|
33 |
-
<show_in_website>
|
34 |
-
<show_in_store>
|
35 |
<fields>
|
36 |
<order_view_display translate="label">
|
37 |
<label>Display Login Button on "View Order" page</label>
|
@@ -41,9 +47,17 @@
|
|
41 |
<show_in_default>1</show_in_default>
|
42 |
<comment><![CDATA[]]></comment>
|
43 |
</order_view_display>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
</fields>
|
45 |
-
</
|
46 |
</groups>
|
47 |
-
</
|
48 |
</sections>
|
49 |
</config>
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
18 |
*/
|
19 |
|
20 |
|
22 |
|
23 |
<config>
|
24 |
<sections>
|
25 |
+
<widgentologin translate="label" module="widgentologin">
|
26 |
+
<tab>widgento</tab>
|
27 |
+
<label>Login as Customer</label>
|
28 |
+
<frontend_type>text</frontend_type>
|
29 |
+
<sort_order>200</sort_order>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>0</show_in_website>
|
32 |
+
<show_in_store>0</show_in_store>
|
33 |
<groups>
|
34 |
+
<general translate="label" module="widgentologin">
|
35 |
+
<label>General</label>
|
36 |
+
<sort_order>1</sort_order>
|
37 |
<frontend_type>text</frontend_type>
|
|
|
38 |
<show_in_default>1</show_in_default>
|
39 |
+
<show_in_website>0</show_in_website>
|
40 |
+
<show_in_store>0</show_in_store>
|
41 |
<fields>
|
42 |
<order_view_display translate="label">
|
43 |
<label>Display Login Button on "View Order" page</label>
|
47 |
<show_in_default>1</show_in_default>
|
48 |
<comment><![CDATA[]]></comment>
|
49 |
</order_view_display>
|
50 |
+
<save_logs translate="label">
|
51 |
+
<label>Save Login Logs</label>
|
52 |
+
<frontend_type>select</frontend_type>
|
53 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
54 |
+
<sort_order>sort</sort_order>
|
55 |
+
<show_in_default>1</show_in_default>
|
56 |
+
<comment><![CDATA[]]></comment>
|
57 |
+
</save_logs>
|
58 |
</fields>
|
59 |
+
</general>
|
60 |
</groups>
|
61 |
+
</widgentologin>
|
62 |
</sections>
|
63 |
</config>
|
app/code/community/Widgento/Login/sql/{widgentologin_setup/mysql4-upgrade-1.0.1.php → widgento_login_setup/mysql4-install-1.1.0.php}
RENAMED
@@ -13,7 +13,7 @@
|
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
@@ -46,4 +46,15 @@ CREATE TABLE `'.$installer->getTable('widgentologin/login').'` (
|
|
46 |
|
47 |
');
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
$installer->endSetup();
|
13 |
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|
46 |
|
47 |
');
|
48 |
|
49 |
+
$installer->run('
|
50 |
+
|
51 |
+
ALTER TABLE `'.$installer->getTable('widgentologin/login').'`
|
52 |
+
ADD COLUMN `created_at` TIMESTAMP NOT NULL
|
53 |
+
, ADD COLUMN `is_active` TINYINT UNSIGNED NOT NULL DEFAULT 0
|
54 |
+
, ADD COLUMN `admin_id` SMALLINT UNSIGNED NOT NULL
|
55 |
+
, ADD COLUMN `store_id` SMALLINT UNSIGNED NULL
|
56 |
+
;
|
57 |
+
|
58 |
+
');
|
59 |
+
|
60 |
$installer->endSetup();
|
app/code/community/Widgento/Login/sql/widgentologin_setup/mysql4-install-0.1.0.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Widgento_Login
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0), a
|
9 |
-
* copy of which is available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* @category Widgento
|
13 |
-
* @package Widgento_Login
|
14 |
-
* @author Yury Ksenevich <info@widgento.com>
|
15 |
-
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
|
20 |
-
?><?php
|
21 |
-
|
22 |
-
/* @var $installer Mage_Catalog_Model_Resource_Setup */
|
23 |
-
$installer = $this;
|
24 |
-
|
25 |
-
$installer->startSetup();
|
26 |
-
|
27 |
-
$installer->run('
|
28 |
-
|
29 |
-
DROP TABLE IF EXISTS `'.$installer->getTable('widgentologin/login_deprecated').';
|
30 |
-
|
31 |
-
DELETE FROM `'.$installer->getTable('core/resource').'
|
32 |
-
WHERE code LIKE "spadar%";
|
33 |
-
|
34 |
-
');
|
35 |
-
|
36 |
-
$installer->run('
|
37 |
-
|
38 |
-
DROP TABLE IF EXISTS `'.$installer->getTable('widgentologin/login').';
|
39 |
-
|
40 |
-
CREATE TABLE `'.$installer->getTable('widgentologin/login').'` (
|
41 |
-
`login_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
42 |
-
`login_hash` CHAR(32) NOT NULL,
|
43 |
-
`customer_id` INT UNSIGNED NOT NULL DEFAULT 0,
|
44 |
-
PRIMARY KEY (`login_Id`)
|
45 |
-
) ENGINE = InnoDB;
|
46 |
-
|
47 |
-
');
|
48 |
-
|
49 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Widgento/Login/sql/widgentologin_setup/mysql4-install-1.0.1.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Widgento_Login
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0), a
|
9 |
-
* copy of which is available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* @category Widgento
|
13 |
-
* @package Widgento_Login
|
14 |
-
* @author Yury Ksenevich <info@widgento.com>
|
15 |
-
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
|
20 |
-
?><?php
|
21 |
-
|
22 |
-
/* @var $installer Mage_Catalog_Model_Resource_Setup */
|
23 |
-
$installer = $this;
|
24 |
-
|
25 |
-
$installer->startSetup();
|
26 |
-
|
27 |
-
$installer->run('
|
28 |
-
|
29 |
-
DROP TABLE IF EXISTS `'.$installer->getTable('widgentologin/login').'`;
|
30 |
-
|
31 |
-
CREATE TABLE `'.$installer->getTable('widgentologin/login').'` (
|
32 |
-
`login_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
33 |
-
`login_hash` CHAR(32) NOT NULL,
|
34 |
-
`customer_id` INT UNSIGNED NOT NULL DEFAULT 0,
|
35 |
-
PRIMARY KEY (`login_Id`)
|
36 |
-
) ENGINE = InnoDB;
|
37 |
-
|
38 |
-
');
|
39 |
-
|
40 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/layout/widgentologin.xml
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
-
* @license http://
|
18 |
*/
|
19 |
|
20 |
|
@@ -29,7 +29,18 @@
|
|
29 |
|
30 |
<adminhtml_sales_order_view>
|
31 |
<reference name="sales_order_edit">
|
32 |
-
<action method="addButton"><id>login</id><data helper="widgentologin/button/getButtonData" /><level>-1</level><sort>0</sort><area helper="widgentologin/button/getButtonArea" /></action>
|
33 |
</reference>
|
34 |
</adminhtml_sales_order_view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
</layout>
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
18 |
*/
|
19 |
|
20 |
|
29 |
|
30 |
<adminhtml_sales_order_view>
|
31 |
<reference name="sales_order_edit">
|
32 |
+
<action method="addButton" ifconfig="widgentologin/general/order_view_display"><id>login</id><data helper="widgentologin/button/getButtonData" /><level>-1</level><sort>0</sort><area helper="widgentologin/button/getButtonArea" /></action>
|
33 |
</reference>
|
34 |
</adminhtml_sales_order_view>
|
35 |
+
|
36 |
+
<widgentologinadmin_log_index>
|
37 |
+
<reference name="content">
|
38 |
+
<block type="widgentologin/adminhtml_log" name="widgentologin.log"></block>
|
39 |
+
</reference>
|
40 |
+
</widgentologinadmin_log_index>
|
41 |
+
|
42 |
+
<widgentologinadmin_log_grid>
|
43 |
+
<update handle="formkey"/>
|
44 |
+
<block type="widgentologin/adminhtml_log_grid" name="widgentologin.log.grid" output="toHtml"></block>
|
45 |
+
</widgentologinadmin_log_grid>
|
46 |
</layout>
|
app/etc/modules/Spadar_Login.xml
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
-
* @license http://
|
18 |
*/
|
19 |
|
20 |
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
18 |
*/
|
19 |
|
20 |
|
app/etc/modules/Widgento_Core.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<!--
|
3 |
|
4 |
/**
|
5 |
-
*
|
6 |
*
|
7 |
* NOTICE OF LICENSE
|
8 |
*
|
@@ -11,10 +11,10 @@
|
|
11 |
* http://opensource.org/licenses/osl-3.0.php
|
12 |
*
|
13 |
* @category Widgento
|
14 |
-
* @package
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
-
* @license http://
|
18 |
*/
|
19 |
|
20 |
|
2 |
<!--
|
3 |
|
4 |
/**
|
5 |
+
* Widgento_Login
|
6 |
*
|
7 |
* NOTICE OF LICENSE
|
8 |
*
|
11 |
* http://opensource.org/licenses/osl-3.0.php
|
12 |
*
|
13 |
* @category Widgento
|
14 |
+
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
18 |
*/
|
19 |
|
20 |
|
app/etc/modules/Widgento_Login.xml
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
-
* @license http://
|
18 |
*/
|
19 |
|
20 |
|
14 |
* @package Widgento_Login
|
15 |
* @author Yury Ksenevich <info@widgento.com>
|
16 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
17 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
18 |
*/
|
19 |
|
20 |
|
app/locale/de_DE/Widgento_Login.csv
CHANGED
@@ -1 +1,10 @@
|
|
1 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Admin Username","Admin Benutzername"
|
2 |
+
"Clear Logs","Protokolle löschen"
|
3 |
+
"Customer Email","Kunde E-Mail"
|
4 |
+
"Log has been cleared successfully.","Protokoll wurde erfolgreich gelöscht."
|
5 |
+
"Log in customer","Kundelogin"
|
6 |
+
"Login as Customer Logs","Melden Sie sich als Kunde-Protokolle"
|
7 |
+
"Login Date","Login-Datum"
|
8 |
+
"Login Store","Login speichern"
|
9 |
+
"Save Login Logs","Speichern Login-Protokolle"
|
10 |
+
"View Customer","Ansicht-Kunden"
|
app/locale/en_US/Widgento_Login.csv
CHANGED
@@ -1 +1,10 @@
|
|
1 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Admin Username","Admin Username"
|
2 |
+
"Clear Logs","Clear Logs"
|
3 |
+
"Customer Email","Customer Email"
|
4 |
+
"Log has been cleared successfully.","Log has been cleared successfully."
|
5 |
+
"Log in customer","Log in customer"
|
6 |
+
"Login as Customer Logs","Login as Customer Logs"
|
7 |
+
"Login Date","Login Date"
|
8 |
+
"Login Store","Login Store"
|
9 |
+
"Save Login Logs","Save Login Logs"
|
10 |
+
"View Customer","View Customer"
|
package.xml
CHANGED
@@ -1,18 +1,21 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>SpadarLogin</name>
|
4 |
-
<version>1.0
|
5 |
<stability>stable</stability>
|
6 |
-
<license uri="http://
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Login as Customer</summary>
|
10 |
<description>Allows admin users login as customers from admin</description>
|
11 |
-
<notes>*
|
|
|
|
|
|
|
12 |
<authors><author><name>Yury Ksenevich</name><user>widgento</user><email>info@widgento.com</email></author><author><name>Yury Ksenevich</name><user>spadar</user><email>yury@spadar.com</email></author></authors>
|
13 |
-
<date>2014-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Widgento"><dir name="Core"><dir name="Helper"><file name="Data.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>7.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.4</min><max/></package></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>SpadarLogin</name>
|
4 |
+
<version>1.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="http://www.widgento.com/customer-service">Widgento Modules License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Login as Customer</summary>
|
10 |
<description>Allows admin users login as customers from admin</description>
|
11 |
+
<notes>* Magento CE 1.9 and EE 1.14 compatibility
|
12 |
+
* New feature to track admin logins
|
13 |
+
* Added compatibility observers for thirtparty module developers
|
14 |
+
! Fixed the issue with old session data merging </notes>
|
15 |
<authors><author><name>Yury Ksenevich</name><user>widgento</user><email>info@widgento.com</email></author><author><name>Yury Ksenevich</name><user>spadar</user><email>yury@spadar.com</email></author></authors>
|
16 |
+
<date>2014-07-29</date>
|
17 |
+
<time>07:07:57</time>
|
18 |
+
<contents><target name="magecommunity"><dir name="Widgento"><dir name="Core"><dir name="Helper"><file name="Data.php" hash="929c2542f8802eeac8e8a47d9827838c"/></dir><dir name="Model"><file name="Feed.php" hash="f1a68ca6ddfe11d01411a865d86b25d2"/><dir name="Uninstall"><file name="Abstract.php" hash="d46e17bb889b357aa3d6d14f3dd4ead2"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="RewriteController.php" hash="1fdbac4642f60280d12cd8e9e4b7e899"/></dir></dir><dir name="etc"><file name="config.xml" hash="aa14cf3963a2939d79340d6fdff7e4df"/><file name="manifest.xml" hash="0846a6969c50351de5b2cfccc3b56048"/><file name="system.xml" hash="e2feaa57c405886ffde056205b896265"/></dir></dir><dir name="Login"><dir name="Block"><dir name="Adminhtml"><dir name="Log"><file name="Grid.php" hash="5ec0afb70619579ec70cf4bfc8f24ff6"/></dir><file name="Log.php" hash="f6fa683690849091eeb4d9cd8f255789"/></dir></dir><dir name="Helper"><file name="Button.php" hash="bdc1e48d706e266f8ea9d358829c6994"/><file name="Data.php" hash="7f41ffd999ff2c0392690042bcd8f0af"/></dir><dir name="Model"><file name="Login.php" hash="4f490d081c6e291ed27be8dd35dbfab2"/><dir name="Mysql4"><dir name="Login"><file name="Collection.php" hash="ad03643e70379020bb220e84af09d1f3"/></dir><file name="Login.php" hash="c23264a72bc5715fb74faac22d65351f"/></dir><file name="Uninstall.php" hash="3098d55d3d0e395d098c7b005d0ff427"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="c2caf941285ab8417f4ac0b1dff53579"/><file name="LogController.php" hash="a99b851989d5d37500b245d1de88fcf5"/></dir><file name="IndexController.php" hash="c183c3ffb1bd8497c80ab33b366c2000"/></dir><dir name="etc"><file name="config.xml" hash="f6ae0a2d95840a34f5bf345544d9ecf0"/><file name="manifest.xml" hash="50e9b7620ec562998ed3543ac623ebe7"/><file name="system.xml" hash="cefce2fcf4556519e38229b48d00b6cd"/></dir><dir name="sql"><dir name="widgento_login_setup"><file name="mysql4-install-1.1.0.php" hash="dfcbc452bb4217fcd83f6bc13945e931"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Widgento_Core.xml" hash="68db7487c41f68d1dc90ee28fbec2ed1"/><file name="Widgento_Login.xml" hash="1f47610e037a802e5f47c6ea2f3038e2"/><file name="Spadar_Login.xml" hash="729856df84b4c7440d669588c6874bc0"/></dir></target><target name="mage"><dir name="shell"><file name="widgento_uninstall.php" hash="cdd962b57f486c3e34a9344083ccec22"/></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Widgento_Login.csv" hash="2b5e63cebdaca03c458737d7ee2c7a1a"/></dir><dir name="en_US"><file name="Widgento_Login.csv" hash="58e5ec2b05b5b446c636c86fae8be482"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="widgentologin.xml" hash="777517182a707510d8aebbbb70b1ed13"/></dir></dir></dir></dir></target></contents>
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.1.0</min><max>7.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.4</min><max/></package></required></dependencies>
|
21 |
</package>
|
shell/widgento_uninstall.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
@@ -10,10 +10,10 @@
|
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
*
|
12 |
* @category Widgento
|
13 |
-
* @package
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
-
* @license http://
|
17 |
*/
|
18 |
|
19 |
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Widgento_Login
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
*
|
12 |
* @category Widgento
|
13 |
+
* @package Widgento_Login
|
14 |
* @author Yury Ksenevich <info@widgento.com>
|
15 |
* @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
|
16 |
+
* @license http://www.widgento.com/customer-service Widgento Modules License
|
17 |
*/
|
18 |
|
19 |
|