Version Notes
- 2.2.0: support Magento 1.8 + custom input validation of username
- 2.0.7: update MageTrashApp, fix some bug in specific case during checkout process
- 2.0.5: remove test text
- 2.0.4: fix of "username exists" error message
- 2.0.3: fix bad Observer merge
- 2.0.1 / 2.0.2:
- Add composer, modman, MageTrashApp support to help installing and uninstalling this module
- Move template to design base package
- Fix several bugs like saving username from frontend, checkout process as guest, etc
- Follow best practices for module setup
- Version 1.5.0: update for Magento 1.7
- Version 1.4.0: fix a problem to enable and disable a customer account from Customer Management in backend
- Version 1.3.0: new features. Configurable options: display username in Manage Customer Grid, allow customer to edit or not username in frontend My Account, define maximum and minimum length of username for the forms, define what kind of validation desired (letters, digits, both or both " _-)
- Version 1.2.1: fix customer account layout
- Version 1.2.0: fix problem with case sensitive OS, limit the number of characters possible (now it's between 6 and 30 letters), allow only some characters, try to provide compatibility update for users who had the old Jfusion_Username module, generate a username for old customers who don't have it, based on email address and a random id, improve the german translation, tested on 1.6.2 and 1.5.1
- Version 1.1.0: change the module name from Jfusion_Customer to Diglin_Username, fix bugs with checkout frontend and backend and with old customers
- Version 1.0.2 - fix a bug with the installation
- Version 1.0.1 - fix bug in sql query during installation on prefixed tables, add german translation, do package for Magento version prior to 1.5 and version 1.5.x
- Version 1.0.0 - stable version
Release Info
Developer | diglin |
Extension | Diglin_Username |
Version | 2.2.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.7 to 2.2.0
- app/code/community/Diglin/Username/Block/Adminhtml/Config/Source/Hint.php +35 -0
- app/code/community/Diglin/Username/Block/Overwrite/Adminhtml/Config/Source/Hint.php +0 -35
- app/code/community/Diglin/Username/Block/Overwrite/Adminhtml/Grid.php +0 -25
- app/code/community/Diglin/Username/Helper/Data.php +12 -1
- app/code/community/Diglin/Username/Model/Config/Share.php +13 -3
- app/code/community/Diglin/Username/Model/Config/Source/Inputvalidation.php +20 -6
- app/code/community/Diglin/Username/Model/Customer.php +16 -3
- app/code/community/Diglin/Username/Model/Entity/Customer.php +13 -2
- app/code/community/Diglin/Username/Model/Entity/Setup.php +12 -1
- app/code/community/Diglin/Username/Model/Form.php +34 -5
- app/code/community/Diglin/Username/Model/Import/Entity/Customer.php +18 -3
- app/code/community/Diglin/Username/Model/Observer.php +43 -3
- app/code/community/Diglin/Username/controllers/AccountController.php +17 -5
- app/code/community/Diglin/Username/data/username_setup/data-install-2.0.0.php +11 -1
- app/code/community/Diglin/Username/etc/adminhtml.xml +29 -0
- app/code/community/Diglin/Username/etc/config.xml +39 -8
- app/code/community/Diglin/Username/etc/system.xml +58 -13
- app/code/community/Diglin/Username/sql/username_setup/install-2.0.0.php +11 -1
- app/code/community/Diglin/Username/sql/username_setup/mysql4-install-1.0.0.php +12 -1
- app/code/community/Diglin/Username/sql/username_setup/mysql4-upgrade-1.0.0-1.1.0.php +11 -1
- app/code/community/Diglin/Username/sql/username_setup/mysql4-upgrade-1.1.0-1.2.0.php +12 -1
- app/code/community/Diglin/Username/sql/username_setup/mysql4-upgrade-1.3.0-1.4.0.php +11 -1
- app/code/community/Diglin/Username/sql/username_setup/mysql4-upgrade-1.4.0-2.0.0.php +12 -1
- app/code/community/Diglin/Username/sql/username_setup/uninstall.php +11 -1
- app/code/community/Hackathon/MageTrashApp/etc/adminhtml.xml +1 -1
- app/code/community/Hackathon/MageTrashApp/etc/config.xml +1 -1
- app/code/community/Hackathon/MageTrashApp/etc/system.xml +1 -1
- app/design/frontend/base/default/template/username/checkout/onepage/billing.phtml +1 -1
- app/design/frontend/base/default/template/username/checkout/onepage/login.phtml +2 -1
- app/design/frontend/base/default/template/username/customer/account/dashboard/info.phtml +1 -1
- app/design/frontend/base/default/template/username/customer/form/13/register.phtml +9 -9
- app/design/frontend/base/default/template/username/customer/form/17/register.phtml +5 -4
- app/design/frontend/base/default/template/username/customer/form/edit.phtml +7 -4
- app/design/frontend/base/default/template/username/customer/form/forgotpassword.phtml +2 -2
- app/design/frontend/base/default/template/username/customer/form/login.phtml +3 -2
- app/design/frontend/base/default/template/username/persistent/checkout/onepage/billing.phtml +1 -1
- app/design/frontend/base/default/template/username/persistent/checkout/onepage/login.phtml +3 -2
- app/design/frontend/base/default/template/username/persistent/customer/form/login.phtml +3 -2
- app/design/frontend/base/default/template/username/persistent/customer/form/register.phtml +2 -2
- app/locale/en_US/Diglin_Username.csv +41 -4
- package.xml +12 -9
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Diglin
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Diglin
|
16 |
+
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Diglin_Username_Block_Adminhtml_Config_Source_Hint
|
21 |
+
extends Mage_Adminhtml_Block_Abstract
|
22 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
23 |
+
{
|
24 |
+
/**
|
25 |
+
* Render fieldset html
|
26 |
+
*
|
27 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
31 |
+
{
|
32 |
+
$version = Mage::getConfig()->getModuleConfig('Diglin_Username')->version;
|
33 |
+
return '<p><a href="http://www.diglin.com/?utm_source=magento&utm_medium=extension&utm_campaign=username"><img style="vertical-align:middle" src="data:image/png;base64,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"></a> <strong>Diglin_Username Version: ' . $version . '</strong></p>';
|
34 |
+
}
|
35 |
+
}
|
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Diglin
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
*
|
13 |
-
* @category Diglin
|
14 |
-
* @package Diglin_Username
|
15 |
-
* @copyright Copyright (c) 2011-2013 Diglin (http://www.diglin.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Diglin_Username_Block_Overwrite_Adminhtml_Config_Source_Hint
|
19 |
-
extends Mage_Adminhtml_Block_Abstract
|
20 |
-
implements Varien_Data_Form_Element_Renderer_Interface
|
21 |
-
{
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Render fieldset html
|
25 |
-
*
|
26 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
27 |
-
* @return string
|
28 |
-
*/
|
29 |
-
public function render(Varien_Data_Form_Element_Abstract $element)
|
30 |
-
{
|
31 |
-
$version = Mage::getConfig()->getModuleConfig('Diglin_Username')->version;
|
32 |
-
return '<p><a href="javascript:window.open(\'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y66QHLU5VX5BC\')"><img src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" alt="Donate via Paypal" /> </a>Please, Invite me for a drink for the hard work done. Thank you in advance for your donation</p>
|
33 |
-
<p><strong>Diglin_Username Version: '.$version.'</strong></p>';
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Diglin
|
4 |
-
*
|
5 |
-
* @category Diglin
|
6 |
-
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-2013 Diglin (http://www.diglin.com)
|
8 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
-
*/
|
10 |
-
class Diglin_Username_Block_Overwrite_Adminhtml_Grid extends Mage_Adminhtml_Block_Customer_Grid
|
11 |
-
{
|
12 |
-
|
13 |
-
protected function _prepareColumns()
|
14 |
-
{
|
15 |
-
if (Mage::getStoreConfigFlag('username/general/grid')) {
|
16 |
-
// Set a new column username after the column name
|
17 |
-
$this->addColumnAfter('username', array(
|
18 |
-
'header' => Mage::helper('customer')->__('Username'),
|
19 |
-
'index' => 'username'
|
20 |
-
),
|
21 |
-
'name');
|
22 |
-
}
|
23 |
-
return parent::_prepareColumns();
|
24 |
-
}
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -2,11 +2,22 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
|
|
10 |
class Diglin_Username_Helper_Data extends Mage_Core_Helper_Abstract
|
11 |
{
|
12 |
public function isPersistentMustBeEnabled ()
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
class Diglin_Username_Helper_Data extends Mage_Core_Helper_Abstract
|
22 |
{
|
23 |
public function isPersistentMustBeEnabled ()
|
@@ -2,9 +2,19 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
10 |
|
@@ -17,7 +27,7 @@
|
|
17 |
class Diglin_Username_Model_Config_Share extends Mage_Customer_Model_Config_Share
|
18 |
{
|
19 |
/**
|
20 |
-
* Check for username
|
21 |
*
|
22 |
* @return Mage_Customer_Model_Config_Share
|
23 |
* @throws Mage_Core_Exception
|
@@ -30,7 +40,7 @@ class Diglin_Username_Model_Config_Share extends Mage_Customer_Model_Config_Shar
|
|
30 |
if ($value == self::SHARE_GLOBAL) {
|
31 |
if (Mage::getResourceSingleton('customer/customer')->findUsernameDuplicates()) {
|
32 |
Mage::throwException(
|
33 |
-
Mage::helper('
|
34 |
);
|
35 |
}
|
36 |
}
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
27 |
class Diglin_Username_Model_Config_Share extends Mage_Customer_Model_Config_Share
|
28 |
{
|
29 |
/**
|
30 |
+
* Check for username duplicates before saving customers sharing options
|
31 |
*
|
32 |
* @return Mage_Customer_Model_Config_Share
|
33 |
* @throws Mage_Core_Exception
|
40 |
if ($value == self::SHARE_GLOBAL) {
|
41 |
if (Mage::getResourceSingleton('customer/customer')->findUsernameDuplicates()) {
|
42 |
Mage::throwException(
|
43 |
+
Mage::helper('username')->__('Cannot share customer accounts globally because some customer accounts with the same username exist on multiple websites and cannot be merged.')
|
44 |
);
|
45 |
}
|
46 |
}
|
@@ -2,20 +2,34 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
|
|
10 |
class Diglin_Username_Model_Config_Source_InputValidation
|
11 |
{
|
12 |
public function toOptionArray()
|
13 |
{
|
|
|
|
|
14 |
return array(
|
15 |
-
array('value'=>'default', 'label'=>
|
16 |
-
array('value'=>'alphanumeric', 'label'=>
|
17 |
-
array('value'=>'alpha', 'label'=>
|
18 |
-
array('value'=>'numeric', 'label'=>
|
|
|
19 |
);
|
20 |
}
|
21 |
-
}
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
class Diglin_Username_Model_Config_Source_InputValidation
|
22 |
{
|
23 |
public function toOptionArray()
|
24 |
{
|
25 |
+
$helper = Mage::helper('username');
|
26 |
+
|
27 |
return array(
|
28 |
+
array('value'=>'default', 'label'=> $helper->__('Default (letters, digits and _- characters)')),
|
29 |
+
array('value'=>'alphanumeric', 'label'=> $helper->__('Letters and digits')),
|
30 |
+
array('value'=>'alpha', 'label'=> $helper->__('Letters only')),
|
31 |
+
array('value'=>'numeric', 'label'=> $helper->__('Digits only')),
|
32 |
+
array('value'=>'custom', 'label'=> $helper->__('Custom (PCRE Regex)')),
|
33 |
);
|
34 |
}
|
35 |
+
}
|
@@ -2,11 +2,22 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
|
|
10 |
class Diglin_Username_Model_Customer extends Mage_Customer_Model_Customer{
|
11 |
|
12 |
/**
|
@@ -36,9 +47,10 @@ class Diglin_Username_Model_Customer extends Mage_Customer_Model_Customer{
|
|
36 |
);
|
37 |
}
|
38 |
Mage::dispatchEvent('customer_customer_authenticated', array(
|
39 |
-
|
40 |
-
|
41 |
));
|
|
|
42 |
return true;
|
43 |
}
|
44 |
|
@@ -59,6 +71,7 @@ class Diglin_Username_Model_Customer extends Mage_Customer_Model_Customer{
|
|
59 |
*
|
60 |
* @param string $username
|
61 |
* @param int $websiteId
|
|
|
62 |
*/
|
63 |
public function customerUsernameExists($username, $websiteId = null)
|
64 |
{
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
class Diglin_Username_Model_Customer extends Mage_Customer_Model_Customer{
|
22 |
|
23 |
/**
|
47 |
);
|
48 |
}
|
49 |
Mage::dispatchEvent('customer_customer_authenticated', array(
|
50 |
+
'model' => $this,
|
51 |
+
'password' => $password,
|
52 |
));
|
53 |
+
|
54 |
return true;
|
55 |
}
|
56 |
|
71 |
*
|
72 |
* @param string $username
|
73 |
* @param int $websiteId
|
74 |
+
* @return Diglin_Username_Model_Customer|boolean
|
75 |
*/
|
76 |
public function customerUsernameExists($username, $websiteId = null)
|
77 |
{
|
@@ -2,11 +2,22 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
|
|
10 |
class Diglin_Username_Model_Entity_Customer extends Mage_Customer_Model_Resource_Customer {
|
11 |
|
12 |
protected function _beforeSave(Varien_Object $customer)
|
@@ -23,7 +34,7 @@ class Diglin_Username_Model_Entity_Customer extends Mage_Customer_Model_Resource
|
|
23 |
$model = Mage::getModel('customer/customer');
|
24 |
$result = $model->customerUsernameExists($customer->getUsername(), $websiteId);
|
25 |
if ($result && $result->getId() != $customer->getId()) {
|
26 |
-
throw Mage::exception('Mage_Core', Mage::helper('
|
27 |
}
|
28 |
}
|
29 |
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
class Diglin_Username_Model_Entity_Customer extends Mage_Customer_Model_Resource_Customer {
|
22 |
|
23 |
protected function _beforeSave(Varien_Object $customer)
|
34 |
$model = Mage::getModel('customer/customer');
|
35 |
$result = $model->customerUsernameExists($customer->getUsername(), $websiteId);
|
36 |
if ($result && $result->getId() != $customer->getId()) {
|
37 |
+
throw Mage::exception('Mage_Core', Mage::helper('username')->__("Username already exists"));
|
38 |
}
|
39 |
}
|
40 |
|
@@ -2,11 +2,22 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
|
|
10 |
class Diglin_Username_Model_Entity_Setup extends Mage_Customer_Model_Resource_Setup
|
11 |
{
|
12 |
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
class Diglin_Username_Model_Entity_Setup extends Mage_Customer_Model_Resource_Setup
|
22 |
{
|
23 |
|
@@ -2,11 +2,22 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
|
|
10 |
class Diglin_Username_Model_Form extends Mage_Customer_Model_Form
|
11 |
{
|
12 |
/**
|
@@ -58,7 +69,7 @@ class Diglin_Username_Model_Form extends Mage_Customer_Model_Form
|
|
58 |
} elseif ($customerId) {
|
59 |
$customer = $model->load($customerId);
|
60 |
$websiteId = $customer->getWebsiteId();
|
61 |
-
if ($customer->getUsername() == $data['username']) { // don't make any test if the user has already
|
62 |
return $errors;
|
63 |
}
|
64 |
} else {
|
@@ -76,9 +87,27 @@ class Diglin_Username_Model_Form extends Mage_Customer_Model_Form
|
|
76 |
}
|
77 |
|
78 |
// Other rules are validated by the parent class because they are basic rules provided by Magento Core
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
$errors = array_merge($errors, array($message));
|
83 |
}
|
84 |
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
class Diglin_Username_Model_Form extends Mage_Customer_Model_Form
|
22 |
{
|
23 |
/**
|
69 |
} elseif ($customerId) {
|
70 |
$customer = $model->load($customerId);
|
71 |
$websiteId = $customer->getWebsiteId();
|
72 |
+
if ($customer->getUsername() == $data['username']) { // don't make any test if the user has already a username
|
73 |
return $errors;
|
74 |
}
|
75 |
} else {
|
87 |
}
|
88 |
|
89 |
// Other rules are validated by the parent class because they are basic rules provided by Magento Core
|
90 |
+
|
91 |
+
$inputValidation = Mage::getStoreConfig('username/general/input_validation');
|
92 |
+
$useInputValidation = ($inputValidation == 'default' || $inputValidation == 'custom') ? true : false;
|
93 |
+
|
94 |
+
switch ($useInputValidation) {
|
95 |
+
case 'default':
|
96 |
+
$validate = '/^[\w-]*$/';
|
97 |
+
break;
|
98 |
+
case 'custom':
|
99 |
+
$validate = Mage::getStoreConfig('username/general/input_validation_custom');
|
100 |
+
break;
|
101 |
+
}
|
102 |
+
|
103 |
+
$validate = new Zend_Validate_Regex($validate);
|
104 |
+
|
105 |
+
if($useInputValidation && ! $validate->isValid($data['username']) ){
|
106 |
+
if ($useInputValidation == 'custom') {
|
107 |
+
$message = new Zend_Validate_Regex(Mage::getStoreConfig('username/general/input_validation_custom_message'));
|
108 |
+
} else {
|
109 |
+
$message = Mage::helper('username')->__('Username is invalid! Only letters, digits and \'_-\' values are accepted.');
|
110 |
+
}
|
111 |
$errors = array_merge($errors, array($message));
|
112 |
}
|
113 |
|
@@ -2,11 +2,22 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
|
|
10 |
class Diglin_Username_Model_Import_Entity_Customer extends Mage_ImportExport_Model_Import_Entity_Customer
|
11 |
{
|
12 |
/**
|
@@ -32,6 +43,8 @@ class Diglin_Username_Model_Import_Entity_Customer extends Mage_ImportExport_Mod
|
|
32 |
$entityRowsUp = array();
|
33 |
$attributes = array();
|
34 |
|
|
|
|
|
35 |
foreach ($bunch as $rowNum => $rowData) {
|
36 |
if (!$this->validateRow($rowData, $rowNum)) {
|
37 |
continue;
|
@@ -47,8 +60,9 @@ class Diglin_Username_Model_Import_Entity_Customer extends Mage_ImportExport_Mod
|
|
47 |
'updated_at' => now(),
|
48 |
'is_active' => empty($rowData['is_active']) ? 1 : $this->_attributes['is_active']['options'][$rowData['is_active']]
|
49 |
);
|
50 |
-
|
51 |
-
|
|
|
52 |
$entityRow['entity_id'] = $entityId;
|
53 |
$entityRowsUp[] = $entityRow;
|
54 |
} else { // create
|
@@ -58,6 +72,7 @@ class Diglin_Username_Model_Import_Entity_Customer extends Mage_ImportExport_Mod
|
|
58 |
$entityRow['attribute_set_id'] = 0;
|
59 |
$entityRow['website_id'] = $this->_websiteCodeToId[$rowData[self::COL_WEBSITE]];
|
60 |
$entityRow['email'] = $rowData[self::COL_EMAIL];
|
|
|
61 |
$entityRowsIn[] = $entityRow;
|
62 |
|
63 |
$this->_newCustomers[$rowData[self::COL_EMAIL]][$rowData[self::COL_WEBSITE]] = $entityId;
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
class Diglin_Username_Model_Import_Entity_Customer extends Mage_ImportExport_Model_Import_Entity_Customer
|
22 |
{
|
23 |
/**
|
43 |
$entityRowsUp = array();
|
44 |
$attributes = array();
|
45 |
|
46 |
+
$oldCustomersToLower = array_change_key_case($this->_oldCustomers, CASE_LOWER);
|
47 |
+
|
48 |
foreach ($bunch as $rowNum => $rowData) {
|
49 |
if (!$this->validateRow($rowData, $rowNum)) {
|
50 |
continue;
|
60 |
'updated_at' => now(),
|
61 |
'is_active' => empty($rowData['is_active']) ? 1 : $this->_attributes['is_active']['options'][$rowData['is_active']]
|
62 |
);
|
63 |
+
$emailToLower = strtolower($rowData[self::COL_EMAIL]);
|
64 |
+
if (isset($oldCustomersToLower[$emailToLower][$rowData[self::COL_WEBSITE]])) { // edit
|
65 |
+
$entityId = $oldCustomersToLower[$emailToLower][$rowData[self::COL_WEBSITE]];
|
66 |
$entityRow['entity_id'] = $entityId;
|
67 |
$entityRowsUp[] = $entityRow;
|
68 |
} else { // create
|
72 |
$entityRow['attribute_set_id'] = 0;
|
73 |
$entityRow['website_id'] = $this->_websiteCodeToId[$rowData[self::COL_WEBSITE]];
|
74 |
$entityRow['email'] = $rowData[self::COL_EMAIL];
|
75 |
+
$entityRow['is_active'] = 1;
|
76 |
$entityRowsIn[] = $entityRow;
|
77 |
|
78 |
$this->_newCustomers[$rowData[self::COL_EMAIL]][$rowData[self::COL_WEBSITE]] = $entityId;
|
@@ -2,11 +2,22 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
|
|
10 |
class Diglin_Username_Model_Observer extends Mage_Customer_Model_Observer
|
11 |
{
|
12 |
/**
|
@@ -52,7 +63,7 @@ class Diglin_Username_Model_Observer extends Mage_Customer_Model_Observer
|
|
52 |
*
|
53 |
* @param Varien_Event_Observer $observer
|
54 |
*/
|
55 |
-
public function changeEavAttribute ($observer)
|
56 |
{
|
57 |
$minLength = Mage::getStoreConfig('username/general/min_length');
|
58 |
$maxLength = Mage::getStoreConfig('username/general/max_length');
|
@@ -73,7 +84,7 @@ class Diglin_Username_Model_Observer extends Mage_Customer_Model_Observer
|
|
73 |
$rules['max_text_length'] = $maxLength;
|
74 |
$rules['min_text_length'] = $minLength;
|
75 |
|
76 |
-
if($inputValidation != 'default') {
|
77 |
$rules['input_validation'] = $inputValidation;
|
78 |
}else {
|
79 |
$rules['input_validation'] = '';
|
@@ -83,4 +94,33 @@ class Diglin_Username_Model_Observer extends Mage_Customer_Model_Observer
|
|
83 |
$attributeUsernameModel->save();
|
84 |
}
|
85 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
class Diglin_Username_Model_Observer extends Mage_Customer_Model_Observer
|
22 |
{
|
23 |
/**
|
63 |
*
|
64 |
* @param Varien_Event_Observer $observer
|
65 |
*/
|
66 |
+
public function changeEavAttribute (Varien_Event_Observer $observer)
|
67 |
{
|
68 |
$minLength = Mage::getStoreConfig('username/general/min_length');
|
69 |
$maxLength = Mage::getStoreConfig('username/general/max_length');
|
84 |
$rules['max_text_length'] = $maxLength;
|
85 |
$rules['min_text_length'] = $minLength;
|
86 |
|
87 |
+
if($inputValidation != 'default' && $inputValidation != 'custom') {
|
88 |
$rules['input_validation'] = $inputValidation;
|
89 |
}else {
|
90 |
$rules['input_validation'] = '';
|
94 |
$attributeUsernameModel->save();
|
95 |
}
|
96 |
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Event
|
100 |
+
* - block_html_before
|
101 |
+
*
|
102 |
+
* @param Varien_Event_Observer $observer
|
103 |
+
*/
|
104 |
+
public function addUsernameColumn(Varien_Event_Observer $observer)
|
105 |
+
{
|
106 |
+
if (!Mage::getStoreConfigFlag('username/general/grid')) {
|
107 |
+
return;
|
108 |
+
}
|
109 |
+
|
110 |
+
$grid = $observer->getBlock();
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Mage_Adminhtml_Block_Customer_Grid
|
114 |
+
*/
|
115 |
+
if ($grid instanceof Mage_Adminhtml_Block_Customer_Grid) {
|
116 |
+
$grid->addColumnAfter(
|
117 |
+
'username',
|
118 |
+
array(
|
119 |
+
'header' => Mage::helper('username')->__('Username'),
|
120 |
+
'index' => 'username'
|
121 |
+
),
|
122 |
+
'email'
|
123 |
+
);
|
124 |
+
}
|
125 |
+
}
|
126 |
}
|
@@ -2,9 +2,19 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
10 |
|
@@ -16,7 +26,7 @@ class Diglin_Username_AccountController extends Mage_Customer_AccountController
|
|
16 |
* Rewrite to allow support of Username
|
17 |
*
|
18 |
*/
|
19 |
-
public function forgotPasswordPostAction
|
20 |
{
|
21 |
$email = (string) $this->getRequest()->getPost('email');
|
22 |
if ($email) {
|
@@ -40,7 +50,7 @@ class Diglin_Username_AccountController extends Mage_Customer_AccountController
|
|
40 |
|
41 |
if ($customer->getId()) {
|
42 |
try {
|
43 |
-
$newResetPasswordLinkToken =
|
44 |
$customer->changeResetPasswordLinkToken($newResetPasswordLinkToken);
|
45 |
$customer->sendPasswordResetConfirmationEmail();
|
46 |
} catch (Exception $exception) {
|
@@ -50,11 +60,13 @@ class Diglin_Username_AccountController extends Mage_Customer_AccountController
|
|
50 |
}
|
51 |
}
|
52 |
$this->_getSession()
|
53 |
-
->addSuccess(
|
|
|
|
|
54 |
$this->_redirect('*/*/');
|
55 |
return;
|
56 |
} else {
|
57 |
-
$this->_getSession()->addError(
|
58 |
$this->_redirect('*/*/forgotpassword');
|
59 |
return;
|
60 |
}
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
26 |
* Rewrite to allow support of Username
|
27 |
*
|
28 |
*/
|
29 |
+
public function forgotPasswordPostAction()
|
30 |
{
|
31 |
$email = (string) $this->getRequest()->getPost('email');
|
32 |
if ($email) {
|
50 |
|
51 |
if ($customer->getId()) {
|
52 |
try {
|
53 |
+
$newResetPasswordLinkToken = $this->_getHelper('customer')->generateResetPasswordLinkToken();
|
54 |
$customer->changeResetPasswordLinkToken($newResetPasswordLinkToken);
|
55 |
$customer->sendPasswordResetConfirmationEmail();
|
56 |
} catch (Exception $exception) {
|
60 |
}
|
61 |
}
|
62 |
$this->_getSession()
|
63 |
+
->addSuccess( $this->_getHelper('customer')
|
64 |
+
->__('If there is an account associated with %s you will receive an email with a link to reset your password.',
|
65 |
+
$this->_getHelper('customer')->escapeHtml($email)));
|
66 |
$this->_redirect('*/*/');
|
67 |
return;
|
68 |
} else {
|
69 |
+
$this->_getSession()->addError(Mage::helper('username')->__('Please enter your email or username.'));
|
70 |
$this->_redirect('*/*/forgotpassword');
|
71 |
return;
|
72 |
}
|
@@ -2,9 +2,19 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
10 |
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
@@ -1,7 +1,36 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<acl>
|
4 |
<resources>
|
|
|
|
|
|
|
5 |
<admin>
|
6 |
<children>
|
7 |
<system>
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Diglin
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Diglin
|
23 |
+
* @package Diglin_Username
|
24 |
+
* @copyright Copyright (c) 2011 Diglin (http://www.diglin.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
<config>
|
29 |
<acl>
|
30 |
<resources>
|
31 |
+
<all>
|
32 |
+
<title>Allow Everything</title>
|
33 |
+
</all>
|
34 |
<admin>
|
35 |
<children>
|
36 |
<system>
|
@@ -1,8 +1,34 @@
|
|
1 |
-
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Diglin_Username>
|
5 |
-
<version>2.0
|
6 |
</Diglin_Username>
|
7 |
</modules>
|
8 |
<default>
|
@@ -51,11 +77,6 @@
|
|
51 |
<username>
|
52 |
<class>Diglin_Username_Block</class>
|
53 |
</username>
|
54 |
-
<adminhtml>
|
55 |
-
<rewrite>
|
56 |
-
<customer_grid>Diglin_Username_Block_Overwrite_Adminhtml_Grid</customer_grid>
|
57 |
-
</rewrite>
|
58 |
-
</adminhtml>
|
59 |
</blocks>
|
60 |
<models>
|
61 |
<username>
|
@@ -159,9 +180,19 @@
|
|
159 |
</customer_load_collection>
|
160 |
</observers>
|
161 |
</eav_collection_abstract_load_before>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
</events>
|
163 |
</adminhtml>
|
164 |
-
|
165 |
<uninstall>
|
166 |
<filename>uninstall.txt</filename>
|
167 |
</uninstall>
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Diglin
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Diglin
|
23 |
+
* @package Diglin_Username
|
24 |
+
* @copyright Copyright (c) 2011 Diglin (http://www.diglin.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
<config>
|
29 |
<modules>
|
30 |
<Diglin_Username>
|
31 |
+
<version>2.2.0</version>
|
32 |
</Diglin_Username>
|
33 |
</modules>
|
34 |
<default>
|
77 |
<username>
|
78 |
<class>Diglin_Username_Block</class>
|
79 |
</username>
|
|
|
|
|
|
|
|
|
|
|
80 |
</blocks>
|
81 |
<models>
|
82 |
<username>
|
180 |
</customer_load_collection>
|
181 |
</observers>
|
182 |
</eav_collection_abstract_load_before>
|
183 |
+
|
184 |
+
<core_block_abstract_to_html_before>
|
185 |
+
<observers>
|
186 |
+
<username_grid>
|
187 |
+
<type>singleton</type>
|
188 |
+
<class>username/observer</class>
|
189 |
+
<method>addUsernameColumn</method>
|
190 |
+
</username_grid>
|
191 |
+
</observers>
|
192 |
+
</core_block_abstract_to_html_before>
|
193 |
</events>
|
194 |
</adminhtml>
|
195 |
+
|
196 |
<uninstall>
|
197 |
<filename>uninstall.txt</filename>
|
198 |
</uninstall>
|
@@ -1,8 +1,34 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<tabs>
|
4 |
-
<diglin>
|
5 |
-
<label>
|
6 |
<sort_order>400</sort_order>
|
7 |
</diglin>
|
8 |
</tabs>
|
@@ -18,22 +44,21 @@
|
|
18 |
<show_in_store>1</show_in_store>
|
19 |
<groups>
|
20 |
<hint>
|
21 |
-
<frontend_model>username/
|
22 |
<sort_order>0</sort_order>
|
23 |
<show_in_default>1</show_in_default>
|
24 |
<show_in_website>1</show_in_website>
|
25 |
<show_in_store>1</show_in_store>
|
26 |
</hint>
|
27 |
-
<general>
|
28 |
<label>General configuration</label>
|
29 |
<frontend_type>text</frontend_type>
|
30 |
<sort_order>1</sort_order>
|
31 |
<show_in_default>1</show_in_default>
|
32 |
<show_in_website>1</show_in_website>
|
33 |
<show_in_store>1</show_in_store>
|
34 |
-
<comment><![CDATA[]]></comment>
|
35 |
<fields>
|
36 |
-
<enabled>
|
37 |
<label>Enable Username Support</label>
|
38 |
<frontend_type>select</frontend_type>
|
39 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -43,7 +68,7 @@
|
|
43 |
<show_in_store>1</show_in_store>
|
44 |
<comment><![CDATA[Enable username support in your store]]></comment>
|
45 |
</enabled>
|
46 |
-
<frontend>
|
47 |
<label>Allow frontend edit</label>
|
48 |
<frontend_type>select</frontend_type>
|
49 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -53,7 +78,7 @@
|
|
53 |
<show_in_store>1</show_in_store>
|
54 |
<comment><![CDATA[Allow the customer to edit his username in "My Account"]]></comment>
|
55 |
</frontend>
|
56 |
-
<grid>
|
57 |
<label><![CDATA[Display username in "Manage Customers" Grid]]></label>
|
58 |
<frontend_type>select</frontend_type>
|
59 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -61,21 +86,21 @@
|
|
61 |
<show_in_default>1</show_in_default>
|
62 |
<comment><![CDATA[Do you want to display the field 'Username' in the Manage Customer Grid?]]></comment>
|
63 |
</grid>
|
64 |
-
<max_length>
|
65 |
<label>Maximum length of the username</label>
|
66 |
<frontend_type>text</frontend_type>
|
67 |
<sort_order>30</sort_order>
|
68 |
<show_in_default>1</show_in_default>
|
69 |
<comment><![CDATA[What is the maximum length of the string username that you want to accept? By default, it's 30 characters ]]></comment>
|
70 |
</max_length>
|
71 |
-
<min_length>
|
72 |
<label>Minimum length of the username</label>
|
73 |
<frontend_type>text</frontend_type>
|
74 |
<sort_order>40</sort_order>
|
75 |
<show_in_default>1</show_in_default>
|
76 |
<comment><![CDATA[What is the minimum length of the string username that you want to accept? By default, it's 6 characters ]]></comment>
|
77 |
</min_length>
|
78 |
-
<input_validation>
|
79 |
<label>Input Validation</label>
|
80 |
<frontend_type>select</frontend_type>
|
81 |
<source_model>username/config_source_inputvalidation</source_model>
|
@@ -83,11 +108,31 @@
|
|
83 |
<show_in_default>1</show_in_default>
|
84 |
<comment><![CDATA[What kind of username do you want to accept? You can set the value 'Default' which accept letters, digits and the special characters '_-' ]]></comment>
|
85 |
</input_validation>
|
86 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
<label>Case Sensitive Username</label>
|
88 |
<frontend_type>select</frontend_type>
|
89 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
90 |
-
<sort_order>
|
91 |
<show_in_default>1</show_in_default>
|
92 |
<comment><![CDATA[Do you want to make the username case sensitive? If not case sensitive, the username will be saved in lowercase. The idea to save in lowercase is to not irritate the user in case he provides a wrong username case.]]></comment>
|
93 |
</case_sensitive>
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Diglin
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Diglin
|
23 |
+
* @package Diglin_Username
|
24 |
+
* @copyright Copyright (c) 2011 Diglin (http://www.diglin.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
<config>
|
29 |
<tabs>
|
30 |
+
<diglin module="username" translate="label">
|
31 |
+
<label><![CDATA[<div><img alt="Diglin" title="Diglin" width="66" height="23" style="display:block;" src="data:image/png;base64,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"></div>]]></label>
|
32 |
<sort_order>400</sort_order>
|
33 |
</diglin>
|
34 |
</tabs>
|
44 |
<show_in_store>1</show_in_store>
|
45 |
<groups>
|
46 |
<hint>
|
47 |
+
<frontend_model>username/adminhtml_config_source_hint</frontend_model>
|
48 |
<sort_order>0</sort_order>
|
49 |
<show_in_default>1</show_in_default>
|
50 |
<show_in_website>1</show_in_website>
|
51 |
<show_in_store>1</show_in_store>
|
52 |
</hint>
|
53 |
+
<general model="username" translate="label">
|
54 |
<label>General configuration</label>
|
55 |
<frontend_type>text</frontend_type>
|
56 |
<sort_order>1</sort_order>
|
57 |
<show_in_default>1</show_in_default>
|
58 |
<show_in_website>1</show_in_website>
|
59 |
<show_in_store>1</show_in_store>
|
|
|
60 |
<fields>
|
61 |
+
<enabled model="username" translate="label comment">
|
62 |
<label>Enable Username Support</label>
|
63 |
<frontend_type>select</frontend_type>
|
64 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
68 |
<show_in_store>1</show_in_store>
|
69 |
<comment><![CDATA[Enable username support in your store]]></comment>
|
70 |
</enabled>
|
71 |
+
<frontend model="username" translate="label comment">
|
72 |
<label>Allow frontend edit</label>
|
73 |
<frontend_type>select</frontend_type>
|
74 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
78 |
<show_in_store>1</show_in_store>
|
79 |
<comment><![CDATA[Allow the customer to edit his username in "My Account"]]></comment>
|
80 |
</frontend>
|
81 |
+
<grid model="username" translate="label comment">
|
82 |
<label><![CDATA[Display username in "Manage Customers" Grid]]></label>
|
83 |
<frontend_type>select</frontend_type>
|
84 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
86 |
<show_in_default>1</show_in_default>
|
87 |
<comment><![CDATA[Do you want to display the field 'Username' in the Manage Customer Grid?]]></comment>
|
88 |
</grid>
|
89 |
+
<max_length model="username" translate="label comment">
|
90 |
<label>Maximum length of the username</label>
|
91 |
<frontend_type>text</frontend_type>
|
92 |
<sort_order>30</sort_order>
|
93 |
<show_in_default>1</show_in_default>
|
94 |
<comment><![CDATA[What is the maximum length of the string username that you want to accept? By default, it's 30 characters ]]></comment>
|
95 |
</max_length>
|
96 |
+
<min_length model="username" translate="label comment">
|
97 |
<label>Minimum length of the username</label>
|
98 |
<frontend_type>text</frontend_type>
|
99 |
<sort_order>40</sort_order>
|
100 |
<show_in_default>1</show_in_default>
|
101 |
<comment><![CDATA[What is the minimum length of the string username that you want to accept? By default, it's 6 characters ]]></comment>
|
102 |
</min_length>
|
103 |
+
<input_validation model="username" translate="label comment">
|
104 |
<label>Input Validation</label>
|
105 |
<frontend_type>select</frontend_type>
|
106 |
<source_model>username/config_source_inputvalidation</source_model>
|
108 |
<show_in_default>1</show_in_default>
|
109 |
<comment><![CDATA[What kind of username do you want to accept? You can set the value 'Default' which accept letters, digits and the special characters '_-' ]]></comment>
|
110 |
</input_validation>
|
111 |
+
<input_validation_custom model="username" translate="label comment">
|
112 |
+
<label>Custom Input Validation</label>
|
113 |
+
<frontend_type>text</frontend_type>
|
114 |
+
<sort_order>60</sort_order>
|
115 |
+
<show_in_default>1</show_in_default>
|
116 |
+
<comment><![CDATA[Provide here a PCRE regex. e.g. <strong>/^[\w-]*$/</strong>. More info at <a href="http://php.net/manual/en/reference.pcre.pattern.syntax.php">PHP Manual</a>]]></comment>
|
117 |
+
<depends>
|
118 |
+
<input_validation>custom</input_validation>
|
119 |
+
</depends>
|
120 |
+
</input_validation_custom>
|
121 |
+
<input_validation_custom_message model="username" translate="label comment">
|
122 |
+
<label>Custom Input Validation - Error Message</label>
|
123 |
+
<frontend_type>text</frontend_type>
|
124 |
+
<sort_order>70</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<comment><![CDATA[Message to show to the user in case of error</a>]]></comment>
|
127 |
+
<depends>
|
128 |
+
<input_validation>custom</input_validation>
|
129 |
+
</depends>
|
130 |
+
</input_validation_custom_message>
|
131 |
+
<case_sensitive model="username" translate="label comment">
|
132 |
<label>Case Sensitive Username</label>
|
133 |
<frontend_type>select</frontend_type>
|
134 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
135 |
+
<sort_order>80</sort_order>
|
136 |
<show_in_default>1</show_in_default>
|
137 |
<comment><![CDATA[Do you want to make the username case sensitive? If not case sensitive, the username will be saved in lowercase. The idea to save in lowercase is to not irritate the user in case he provides a wrong username case.]]></comment>
|
138 |
</case_sensitive>
|
@@ -2,9 +2,19 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
10 |
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
@@ -2,11 +2,22 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
|
|
10 |
$installer = $this;
|
11 |
|
12 |
/* @var $installer Diglin_Username_Model_Entity_Setup */
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
$installer = $this;
|
22 |
|
23 |
/* @var $installer Diglin_Username_Model_Entity_Setup */
|
@@ -2,9 +2,19 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
10 |
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
@@ -2,11 +2,22 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
|
|
10 |
$installer = $this;
|
11 |
/* @var $installer Diglin_Username_Model_Entity_Setup */
|
12 |
$installer->updateAttribute('customer', 'username', 'validate_rules', serialize(array('max_text_length' => 30, 'min_text_length' => 6)));
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
$installer = $this;
|
22 |
/* @var $installer Diglin_Username_Model_Entity_Setup */
|
23 |
$installer->updateAttribute('customer', 'username', 'validate_rules', serialize(array('max_text_length' => 30, 'min_text_length' => 6)));
|
@@ -2,9 +2,19 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
10 |
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
@@ -1,10 +1,21 @@
|
|
1 |
<?php
|
2 |
/**
|
|
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
10 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
* Diglin
|
5 |
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
* @category Diglin
|
17 |
* @package Diglin_Username
|
18 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
@@ -2,9 +2,19 @@
|
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @category Diglin
|
6 |
* @package Diglin_Username
|
7 |
-
* @copyright Copyright (c) 2011-
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
*/
|
10 |
|
2 |
/**
|
3 |
* Diglin
|
4 |
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
* @category Diglin
|
16 |
* @package Diglin_Username
|
17 |
+
* @copyright Copyright (c) 2011-2014 Diglin (http://www.diglin.com)
|
18 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
@@ -8,7 +8,7 @@
|
|
8 |
<children>
|
9 |
<config>
|
10 |
<children>
|
11 |
-
<magetrashapp translate="title" module="
|
12 |
<title>Mage Trash App</title>
|
13 |
</magetrashapp>
|
14 |
</children>
|
8 |
<children>
|
9 |
<config>
|
10 |
<children>
|
11 |
+
<magetrashapp translate="title" module="trashapp">
|
12 |
<title>Mage Trash App</title>
|
13 |
</magetrashapp>
|
14 |
</children>
|
@@ -10,7 +10,7 @@
|
|
10 |
|
11 |
<modules>
|
12 |
<Hackathon_MageTrashApp>
|
13 |
-
<version>1.0.
|
14 |
</Hackathon_MageTrashApp>
|
15 |
</modules>
|
16 |
|
10 |
|
11 |
<modules>
|
12 |
<Hackathon_MageTrashApp>
|
13 |
+
<version>1.0.0</version>
|
14 |
</Hackathon_MageTrashApp>
|
15 |
</modules>
|
16 |
|
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
<config>
|
4 |
<sections>
|
5 |
-
<magetrashapp translate="label"
|
6 |
<label>Mage Trash App</label>
|
7 |
<tab>advanced</tab>
|
8 |
<frontend_type>text</frontend_type>
|
2 |
|
3 |
<config>
|
4 |
<sections>
|
5 |
+
<magetrashapp translate="label">
|
6 |
<label>Mage Trash App</label>
|
7 |
<tab>advanced</tab>
|
8 |
<frontend_type>text</frontend_type>
|
@@ -26,7 +26,7 @@
|
|
26 |
|
27 |
if(version_compare(Mage::getVersion(), '1.7.0') < 0 ) { // Magento version < 1.7.0
|
28 |
$version = '13';
|
29 |
-
} else {
|
30 |
$version = '17';
|
31 |
}
|
32 |
|
26 |
|
27 |
if(version_compare(Mage::getVersion(), '1.7.0') < 0 ) { // Magento version < 1.7.0
|
28 |
$version = '13';
|
29 |
+
} else {
|
30 |
$version = '17';
|
31 |
}
|
32 |
|
@@ -66,13 +66,14 @@
|
|
66 |
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
67 |
<form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
|
68 |
<fieldset>
|
|
|
69 |
<h4><?php echo $this->__('Already registered?') ?></h4>
|
70 |
<p><?php echo $this->__('Please log in below:') ?></p>
|
71 |
<ul class="form-list">
|
72 |
<li>
|
73 |
<label for="login-email" class="required"><em>*</em><?php echo $this->__('Email Address/Username') ?></label>
|
74 |
<div class="input-box">
|
75 |
-
<input type="text" class="input-text required-entry" id="login-email" name="login[username]" value="<?php echo $this->
|
76 |
</div>
|
77 |
</li>
|
78 |
<li>
|
66 |
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
67 |
<form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
|
68 |
<fieldset>
|
69 |
+
<?php echo $this->getBlockHtml('formkey'); ?>
|
70 |
<h4><?php echo $this->__('Already registered?') ?></h4>
|
71 |
<p><?php echo $this->__('Please log in below:') ?></p>
|
72 |
<ul class="form-list">
|
73 |
<li>
|
74 |
<label for="login-email" class="required"><em>*</em><?php echo $this->__('Email Address/Username') ?></label>
|
75 |
<div class="input-box">
|
76 |
+
<input type="text" class="input-text required-entry" id="login-email" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" />
|
77 |
</div>
|
78 |
</li>
|
79 |
<li>
|
@@ -40,7 +40,7 @@ $customer = Mage::getSingleton('customer/session')->getCustomer();
|
|
40 |
</div>
|
41 |
<div class="box-content">
|
42 |
<p>
|
43 |
-
<?php echo $this->__('Username: ') . $this->
|
44 |
</p>
|
45 |
</div>
|
46 |
</div>
|
40 |
</div>
|
41 |
<div class="box-content">
|
42 |
<p>
|
43 |
+
<?php echo $this->__('Username: ') . $this->escapeHtml($customer->getUsername()) ?>
|
44 |
</p>
|
45 |
</div>
|
46 |
</div>
|
@@ -49,13 +49,13 @@
|
|
49 |
<div class="field">
|
50 |
<label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
51 |
<div class="input-box">
|
52 |
-
<input type="text" name="email" id="email" value="<?php echo $this->
|
53 |
</div>
|
54 |
</div>
|
55 |
<div class="field">
|
56 |
<label for="username" class="required"><em>*</em><?php echo Mage::helper('customer')->__('Username') ?></label>
|
57 |
<div class="input-box">
|
58 |
-
<input type="text" name="username" id="username" value="<?php echo $this->
|
59 |
</div>
|
60 |
</div>
|
61 |
</li>
|
@@ -90,26 +90,26 @@
|
|
90 |
<div class="field">
|
91 |
<label for="company"><?php echo $this->__('Company') ?></label>
|
92 |
<div class="input-box">
|
93 |
-
<input type="text" name="company" id="company" value="<?php echo $this->
|
94 |
</div>
|
95 |
</div>
|
96 |
<div class="field">
|
97 |
<label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
98 |
<div class="input-box">
|
99 |
-
<input type="text" name="telephone" id="telephone" value="<?php echo $this->
|
100 |
</div>
|
101 |
</div>
|
102 |
</li>
|
103 |
<li class="wide">
|
104 |
<label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
|
105 |
<div class="input-box">
|
106 |
-
<input type="text" name="street[]" value="<?php echo $this->
|
107 |
</div>
|
108 |
</li>
|
109 |
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
110 |
<li class="wide">
|
111 |
<div class="input-box">
|
112 |
-
<input type="text" name="street[]" value="<?php echo $this->
|
113 |
</div>
|
114 |
</li>
|
115 |
<?php endfor ?>
|
@@ -117,7 +117,7 @@
|
|
117 |
<div class="field">
|
118 |
<label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
119 |
<div class="input-box">
|
120 |
-
<input type="text" name="city" value="<?php echo $this->
|
121 |
</div>
|
122 |
</div>
|
123 |
<div class="field">
|
@@ -131,7 +131,7 @@
|
|
131 |
$('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
|
132 |
//]]>
|
133 |
</script>
|
134 |
-
<input type="text" id="region" name="region" value="<?php echo $this->
|
135 |
</div>
|
136 |
</div>
|
137 |
</li>
|
@@ -139,7 +139,7 @@
|
|
139 |
<div class="field">
|
140 |
<label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
141 |
<div class="input-box">
|
142 |
-
<input type="text" name="postcode" value="<?php echo $this->
|
143 |
</div>
|
144 |
</div>
|
145 |
<div class="field">
|
49 |
<div class="field">
|
50 |
<label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
51 |
<div class="input-box">
|
52 |
+
<input type="text" name="email" id="email" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" />
|
53 |
</div>
|
54 |
</div>
|
55 |
<div class="field">
|
56 |
<label for="username" class="required"><em>*</em><?php echo Mage::helper('customer')->__('Username') ?></label>
|
57 |
<div class="input-box">
|
58 |
+
<input type="text" name="username" id="username" value="<?php echo $this->escapeHtml($this->getFormData()->getUsername()) ?>" title="<?php echo Mage::helper('customer')->__('Username') ?>" class="input-text required-entry" />
|
59 |
</div>
|
60 |
</div>
|
61 |
</li>
|
90 |
<div class="field">
|
91 |
<label for="company"><?php echo $this->__('Company') ?></label>
|
92 |
<div class="input-box">
|
93 |
+
<input type="text" name="company" id="company" value="<?php echo $this->escapeHtml($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
|
94 |
</div>
|
95 |
</div>
|
96 |
<div class="field">
|
97 |
<label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
98 |
<div class="input-box">
|
99 |
+
<input type="text" name="telephone" id="telephone" value="<?php echo $this->escapeHtml($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
|
100 |
</div>
|
101 |
</div>
|
102 |
</li>
|
103 |
<li class="wide">
|
104 |
<label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
|
105 |
<div class="input-box">
|
106 |
+
<input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
|
107 |
</div>
|
108 |
</li>
|
109 |
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
110 |
<li class="wide">
|
111 |
<div class="input-box">
|
112 |
+
<input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
|
113 |
</div>
|
114 |
</li>
|
115 |
<?php endfor ?>
|
117 |
<div class="field">
|
118 |
<label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
119 |
<div class="input-box">
|
120 |
+
<input type="text" name="city" value="<?php echo $this->escapeHtml($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
|
121 |
</div>
|
122 |
</div>
|
123 |
<div class="field">
|
131 |
$('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
|
132 |
//]]>
|
133 |
</script>
|
134 |
+
<input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
135 |
</div>
|
136 |
</div>
|
137 |
</li>
|
139 |
<div class="field">
|
140 |
<label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
141 |
<div class="input-box">
|
142 |
+
<input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
|
143 |
</div>
|
144 |
</div>
|
145 |
<div class="field">
|
@@ -23,11 +23,12 @@
|
|
23 |
* @copyright Copyright (c) 2011 Diglin (http://www.diglin.com)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
-
|
|
|
27 |
/**
|
28 |
* Create account form template
|
29 |
*
|
30 |
-
* @
|
31 |
*/
|
32 |
?>
|
33 |
<div class="account-create">
|
@@ -56,9 +57,9 @@
|
|
56 |
</div>
|
57 |
|
58 |
<div class="field">
|
59 |
-
<label for="username" class="required"><em>*</em><?php echo Mage::helper('
|
60 |
<div class="input-box">
|
61 |
-
<input type="text" name="username" id="username" value="<?php echo $this->
|
62 |
</div>
|
63 |
</div>
|
64 |
</li>
|
23 |
* @copyright Copyright (c) 2011 Diglin (http://www.diglin.com)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
/**
|
29 |
* Create account form template
|
30 |
*
|
31 |
+
* @var $this Mage_Customer_Block_Form_Register
|
32 |
*/
|
33 |
?>
|
34 |
<div class="account-create">
|
57 |
</div>
|
58 |
|
59 |
<div class="field">
|
60 |
+
<label for="username" class="required"><em>*</em><?php echo Mage::helper('username')->__('Username') ?></label>
|
61 |
<div class="input-box">
|
62 |
+
<input type="text" name="username" id="username" value="<?php echo $this->escapeHtml($this->getFormData()->getUsername()) ?>" title="<?php echo Mage::helper('username')->__('Username') ?>" class="input-text required-entry" />
|
63 |
</div>
|
64 |
</div>
|
65 |
</li>
|
@@ -40,17 +40,17 @@
|
|
40 |
<div class="field">
|
41 |
<label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
42 |
<div class="input-box">
|
43 |
-
<input type="text" name="email" id="email" value="<?php echo $this->
|
44 |
</div>
|
45 |
</div>
|
46 |
<div class="field">
|
47 |
<label for="username" class="required"><em>*</em><?php echo Mage::helper('customer')->__('Username') ?></label>
|
48 |
<div class="input-box">
|
49 |
<?php if(Mage::getStoreConfigFlag('username/general/frontend')) : ?>
|
50 |
-
<input type="text" name="username" id="username" value="<?php echo $this->
|
51 |
<?php else: ?>
|
52 |
-
<input type="hidden" name="username" id="username" value="<?php echo $this->
|
53 |
-
<?php echo $this->
|
54 |
<?php endif;?>
|
55 |
</div>
|
56 |
</div>
|
@@ -78,6 +78,8 @@
|
|
78 |
<li>
|
79 |
<label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label>
|
80 |
<div class="input-box">
|
|
|
|
|
81 |
<input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text" name="current_password" id="current_password" />
|
82 |
</div>
|
83 |
</li>
|
@@ -120,6 +122,7 @@
|
|
120 |
$('confirmation').removeClassName('required-entry');
|
121 |
}
|
122 |
}
|
|
|
123 |
<?php if($this->getCustomer()->getChangePassword()): ?>
|
124 |
setPasswordForm(true);
|
125 |
<?php endif; ?>
|
40 |
<div class="field">
|
41 |
<label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
42 |
<div class="input-box">
|
43 |
+
<input type="text" name="email" id="email" value="<?php echo $this->escapeHtml($this->getCustomer()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" />
|
44 |
</div>
|
45 |
</div>
|
46 |
<div class="field">
|
47 |
<label for="username" class="required"><em>*</em><?php echo Mage::helper('customer')->__('Username') ?></label>
|
48 |
<div class="input-box">
|
49 |
<?php if(Mage::getStoreConfigFlag('username/general/frontend')) : ?>
|
50 |
+
<input type="text" name="username" id="username" value="<?php echo $this->escapeHtml($this->getCustomer()->getUsername()) ?>" title="<?php echo Mage::helper('customer')->__('Username') ?>" class="input-text required-entry" />
|
51 |
<?php else: ?>
|
52 |
+
<input type="hidden" name="username" id="username" value="<?php echo $this->escapeHtml($this->getCustomer()->getUsername()) ?>"/>
|
53 |
+
<?php echo $this->escapeHtml($this->getCustomer()->getUsername()); ?>
|
54 |
<?php endif;?>
|
55 |
</div>
|
56 |
</div>
|
78 |
<li>
|
79 |
<label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label>
|
80 |
<div class="input-box">
|
81 |
+
<!-- This is a dummy hidden field to trick firefox from auto filling the password -->
|
82 |
+
<input type="text" class="input-text no-display" name="dummy" id="dummy" />
|
83 |
<input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text" name="current_password" id="current_password" />
|
84 |
</div>
|
85 |
</li>
|
122 |
$('confirmation').removeClassName('required-entry');
|
123 |
}
|
124 |
}
|
125 |
+
|
126 |
<?php if($this->getCustomer()->getChangePassword()): ?>
|
127 |
setPasswordForm(true);
|
128 |
<?php endif; ?>
|
@@ -33,12 +33,12 @@
|
|
33 |
<form action="<?php echo $this->getUrl('*/*/forgotpasswordpost') ?>" method="post" id="form-validate">
|
34 |
<div class="fieldset">
|
35 |
<h2 class="legend"><?php echo $this->__('Retrieve your password here') ?></h2>
|
36 |
-
<p><?php echo
|
37 |
<ul class="form-list">
|
38 |
<li>
|
39 |
<label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address/Username') ?></label>
|
40 |
<div class="input-box">
|
41 |
-
<input type="text" name="email" alt="email" id="email_address" class="input-text required-entry" value="<?php echo $this->
|
42 |
</div>
|
43 |
</li>
|
44 |
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
33 |
<form action="<?php echo $this->getUrl('*/*/forgotpasswordpost') ?>" method="post" id="form-validate">
|
34 |
<div class="fieldset">
|
35 |
<h2 class="legend"><?php echo $this->__('Retrieve your password here') ?></h2>
|
36 |
+
<p><?php echo Mage::helper('username')->__('Please enter your email address or username below. You will receive a link to reset your password.') ?></p>
|
37 |
<ul class="form-list">
|
38 |
<li>
|
39 |
<label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address/Username') ?></label>
|
40 |
<div class="input-box">
|
41 |
+
<input type="text" name="email" alt="email" id="email_address" class="input-text required-entry" value="<?php echo $this->escapeHtml($this->getEmailValue()) ?>" />
|
42 |
</div>
|
43 |
</li>
|
44 |
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
@@ -39,6 +39,7 @@
|
|
39 |
<?php /* Extensions placeholder */ ?>
|
40 |
<?php echo $this->getChildHtml('customer.form.login.extra')?>
|
41 |
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
|
|
|
42 |
<div class="col2-set">
|
43 |
<div class="col-1 new-users">
|
44 |
<div class="content">
|
@@ -52,9 +53,9 @@
|
|
52 |
<p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
|
53 |
<ul class="form-list">
|
54 |
<li>
|
55 |
-
<label for="email" class="required"><em>*</em><?php echo Mage::helper('
|
56 |
<div class="input-box">
|
57 |
-
<input type="text" name="login[username]" value="<?php echo $this->
|
58 |
</div>
|
59 |
</li>
|
60 |
<li>
|
39 |
<?php /* Extensions placeholder */ ?>
|
40 |
<?php echo $this->getChildHtml('customer.form.login.extra')?>
|
41 |
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
|
42 |
+
<?php echo $this->getBlockHtml('formkey'); ?>
|
43 |
<div class="col2-set">
|
44 |
<div class="col-1 new-users">
|
45 |
<div class="content">
|
53 |
<p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
|
54 |
<ul class="form-list">
|
55 |
<li>
|
56 |
+
<label for="email" class="required"><em>*</em><?php echo Mage::helper('username')->__('Email Address/Username') ?></label>
|
57 |
<div class="input-box">
|
58 |
+
<input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry" title="<?php echo Mage::helper('username')->__('Email Address/Username') ?>" />
|
59 |
</div>
|
60 |
</li>
|
61 |
<li>
|
@@ -20,7 +20,7 @@
|
|
20 |
*
|
21 |
* @category design
|
22 |
* @package base_default
|
23 |
-
* @copyright Copyright (c)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
/** @var Mage_Checkout_Block_Onepage_Billing $this */
|
20 |
*
|
21 |
* @category design
|
22 |
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
/** @var Mage_Checkout_Block_Onepage_Billing $this */
|
@@ -72,13 +72,14 @@
|
|
72 |
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
73 |
<form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
|
74 |
<fieldset>
|
|
|
75 |
<h4><?php echo $this->__('Already registered?') ?></h4>
|
76 |
<p><?php echo $this->__('Please log in below:') ?></p>
|
77 |
<ul class="form-list">
|
78 |
<li>
|
79 |
-
<label for="login-email" class="required"><em>*</em><?php echo
|
80 |
<div class="input-box">
|
81 |
-
<input type="text" class="input-text required-entry" id="login-email" name="login[username]" value="<?php echo $this->
|
82 |
</div>
|
83 |
</li>
|
84 |
<li>
|
72 |
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
73 |
<form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
|
74 |
<fieldset>
|
75 |
+
<?php echo $this->getBlockHtml('formkey'); ?>
|
76 |
<h4><?php echo $this->__('Already registered?') ?></h4>
|
77 |
<p><?php echo $this->__('Please log in below:') ?></p>
|
78 |
<ul class="form-list">
|
79 |
<li>
|
80 |
+
<label for="login-email" class="required"><em>*</em><?php echo Mage::helper('username')->__('Email Address/Username') ?></label>
|
81 |
<div class="input-box">
|
82 |
+
<input type="text" class="input-text required-entry" id="login-email" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" />
|
83 |
</div>
|
84 |
</li>
|
85 |
<li>
|
@@ -38,6 +38,7 @@
|
|
38 |
</div>
|
39 |
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
40 |
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
|
|
|
41 |
<div class="col2-set">
|
42 |
<div class="col-1 new-users">
|
43 |
<div class="content">
|
@@ -51,9 +52,9 @@
|
|
51 |
<p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
|
52 |
<ul class="form-list">
|
53 |
<li>
|
54 |
-
<label for="email" class="required"><em>*</em><?php echo Mage::helper('
|
55 |
<div class="input-box">
|
56 |
-
<input type="text" name="login[username]" value="<?php echo $this->
|
57 |
</div>
|
58 |
</li>
|
59 |
<li>
|
38 |
</div>
|
39 |
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
40 |
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
|
41 |
+
<?php echo $this->getBlockHtml('formkey'); ?>
|
42 |
<div class="col2-set">
|
43 |
<div class="col-1 new-users">
|
44 |
<div class="content">
|
52 |
<p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
|
53 |
<ul class="form-list">
|
54 |
<li>
|
55 |
+
<label for="email" class="required"><em>*</em><?php echo Mage::helper('username')->__('Email Address/Username') ?></label>
|
56 |
<div class="input-box">
|
57 |
+
<input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry" title="<?php echo Mage::helper('username')->__('Email Address/Username') ?>" />
|
58 |
</div>
|
59 |
</li>
|
60 |
<li>
|
@@ -56,9 +56,9 @@
|
|
56 |
</div>
|
57 |
|
58 |
<div class="field">
|
59 |
-
<label for="username" class="required"><em>*</em><?php echo Mage::helper('
|
60 |
<div class="input-box">
|
61 |
-
<input type="text" name="username" id="username" value="<?php echo $this->
|
62 |
</div>
|
63 |
</div>
|
64 |
</li>
|
56 |
</div>
|
57 |
|
58 |
<div class="field">
|
59 |
+
<label for="username" class="required"><em>*</em><?php echo Mage::helper('username')->__('Username') ?></label>
|
60 |
<div class="input-box">
|
61 |
+
<input type="text" name="username" id="username" value="<?php echo $this->escapeHtml($this->getFormData()->getUsername()) ?>" title="<?php echo Mage::helper('username')->__('Username') ?>" class="input-text required-entry" />
|
62 |
</div>
|
63 |
</div>
|
64 |
</li>
|
@@ -1,4 +1,41 @@
|
|
1 |
-
"
|
2 |
-
"
|
3 |
-
"
|
4 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Invalid email address.","Invalid email address."
|
2 |
+
"If there is an account associated with %s you will receive an email with a link to reset your password.","If there is an account associated with %s you will receive an email with a link to reset your password."
|
3 |
+
"Please enter your email or username.","Please enter your email or username."
|
4 |
+
"Username Section","Username Section"
|
5 |
+
"Username","Username"
|
6 |
+
"General configuration","General configuration"
|
7 |
+
"Enable Username Support","Enable Username Support"
|
8 |
+
"Enable username support in your store","Enable username support in your store"
|
9 |
+
"Allow frontend edit","Allow frontend edit"
|
10 |
+
"Allow the customer to edit his username in ""My Account""","Allow the customer to edit his username in ""My Account"""
|
11 |
+
"Display username in ""Manage Customers"" Grid","Display username in ""Manage Customers"" Grid"
|
12 |
+
"Do you want to display the field 'Username' in the Manage Customer Grid?","Do you want to display the field 'Username' in the Manage Customer Grid?"
|
13 |
+
"Maximum length of the username","Maximum length of the username"
|
14 |
+
"What is the maximum length of the string username that you want to accept? By default, it's 30 characters ","What is the maximum length of the string username that you want to accept? By default, it's 30 characters "
|
15 |
+
"Minimum length of the username","Minimum length of the username"
|
16 |
+
"What is the minimum length of the string username that you want to accept? By default, it's 6 characters ","What is the minimum length of the string username that you want to accept? By default, it's 6 characters "
|
17 |
+
"Input Validation","Input Validation"
|
18 |
+
"What kind of username do you want to accept? You can set the value 'Default' which accept letters, digits and the special characters '_-' ","What kind of username do you want to accept? You can set the value 'Default' which accept letters, digits and the special characters '_-' "
|
19 |
+
"Custom Input Validation","Custom Input Validation"
|
20 |
+
"Provide here a PCRE regex. e.g. <strong>/^[\w-]*$/</strong>. More info at <a href=""http://php.net/manual/en/reference.pcre.pattern.syntax.php"">PHP Manual</a>","Provide here a PCRE regex. e.g. <strong>/^[\w-]*$/</strong>. More info at <a href=""http://php.net/manual/en/reference.pcre.pattern.syntax.php"">PHP Manual</a>"
|
21 |
+
"Custom Input Validation - Error Message","Custom Input Validation - Error Message"
|
22 |
+
"Message to show to the user in case of error</a>","Message to show to the user in case of error</a>"
|
23 |
+
"Case Sensitive Username","Case Sensitive Username"
|
24 |
+
"Do you want to make the username case sensitive? If not case sensitive, the username will be saved in lowercase. The idea to save in lowercase is to not irritate the user in case he provides a wrong username case.","Do you want to make the username case sensitive? If not case sensitive, the username will be saved in lowercase. The idea to save in lowercase is to not irritate the user in case he provides a wrong username case."
|
25 |
+
"Cannot share customer accounts globally because some customer accounts with the same username exist on multiple websites and cannot be merged.","Cannot share customer accounts globally because some customer accounts with the same username exist on multiple websites and cannot be merged."
|
26 |
+
"Default (letters, digits and _- characters)","Default (letters, digits and _- characters)"
|
27 |
+
"Letters and digits","Letters and digits"
|
28 |
+
"Letters only","Letters only"
|
29 |
+
"Digits only","Digits only"
|
30 |
+
"Custom (PCRE Regex)","Custom (PCRE Regex)"
|
31 |
+
"This account is not confirmed.","This account is not confirmed."
|
32 |
+
"Invalid login or password.","Invalid login or password."
|
33 |
+
"Username already exists","Username already exists"
|
34 |
+
"Customer website ID must be specified when using the website scope.","Customer website ID must be specified when using the website scope."
|
35 |
+
"Username is a required field.","Username is a required field."
|
36 |
+
"Username is invalid! Only letters, digits and \'_-\' values are accepted.","Username is invalid! Only letters, digits and \'_-\' values are accepted."
|
37 |
+
"This account is disabled.","This account is disabled."
|
38 |
+
"Sorry but you cannot set a minimum length value %s bigger than the maximum length value %s. Please, change the values.","Sorry but you cannot set a minimum length value %s bigger than the maximum length value %s. Please, change the values."
|
39 |
+
"Email Address/Username","Email Address/Username"
|
40 |
+
"Username: ","Username: "
|
41 |
+
"Please enter your email address or username below. You will receive a link to reset your password.","Please enter your email address or username below. You will receive a link to reset your password."
|
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Diglin_Username</name>
|
4 |
-
<version>2.0
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -10,6 +10,7 @@
|
|
10 |
Allow to disable an account from backend. The user will be blocked if the option in the customer backend is set to no</summary>
|
11 |
<description>## Features
|
12 |

|
|
|
13 |
- Login with a username and/or email, it can be done from frontend during checkout or getting access to the customer account
|
14 |
- Save a username from frontend (register account or checkout process) or from backend by editing a customer account
|
15 |
- Check that the username doesn't already exists
|
@@ -21,11 +22,13 @@ Allow to disable an account from backend. The user will be blocked if the option
|
|
21 |
- Display Username of each customer in the Customer Management Grid
|
22 |
- Allow or not the customer to edit the username in My Account in frontend
|
23 |
- Compatible and tested with Magento version >=1.4.2 until 1.7.x
|
24 |
-
-
|
25 |
-
-
|
|
|
26 |

|
27 |
Use MageTrashApp to uninstall this module correctly: https://github.com/magento-hackathon/MageTrashApp</description>
|
28 |
-
<notes>- 2.0
|
|
|
29 |
- 2.0.5: remove test text
|
30 |
- 2.0.4: fix of "username exists" error message
|
31 |
- 2.0.3: fix bad Observer merge
|
@@ -43,10 +46,10 @@ Use MageTrashApp to uninstall this module correctly: https://github.com/magento-
|
|
43 |
- Version 1.0.2 - fix a bug with the installation
|
44 |
- Version 1.0.1 - fix bug in sql query during installation on prefixed tables, add german translation, do package for Magento version prior to 1.5 and version 1.5.x
|
45 |
- Version 1.0.0 - stable version</notes>
|
46 |
-
<authors><author><name>diglin</name><user>
|
47 |
-
<date>
|
48 |
-
<time>
|
49 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Diglin_Username.xml" hash="79603fae3def6dd098d4be51897e1ec6"/><file name="Hackathon_MageTrashApp.xml" hash="247c6b5278c3681efe24f504c5b48970"/></dir></target><target name="magecommunity"><dir name="Diglin"><dir name="Username"><dir name="Block"><dir name="
|
50 |
<compatible/>
|
51 |
-
<dependencies
|
52 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Diglin_Username</name>
|
4 |
+
<version>2.2.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
10 |
Allow to disable an account from backend. The user will be blocked if the option in the customer backend is set to no</summary>
|
11 |
<description>## Features
|
12 |

|
13 |
+
- Magento 1.3 to 1.8.1
|
14 |
- Login with a username and/or email, it can be done from frontend during checkout or getting access to the customer account
|
15 |
- Save a username from frontend (register account or checkout process) or from backend by editing a customer account
|
16 |
- Check that the username doesn't already exists
|
22 |
- Display Username of each customer in the Customer Management Grid
|
23 |
- Allow or not the customer to edit the username in My Account in frontend
|
24 |
- Compatible and tested with Magento version >=1.4.2 until 1.7.x
|
25 |
+
- support username when a customer wants to retrieve his forgotten password thanks to the "Forgotten Password" form
|
26 |
+
- support username into the template of the persistent module
|
27 |
+
- NEW - support Custom Regex validation (Select the Input validation 'custom' from the configuration page)
|
28 |

|
29 |
Use MageTrashApp to uninstall this module correctly: https://github.com/magento-hackathon/MageTrashApp</description>
|
30 |
+
<notes>- 2.2.0: support Magento 1.8 + custom input validation of username
|
31 |
+
- 2.0.7: update MageTrashApp, fix some bug in specific case during checkout process
|
32 |
- 2.0.5: remove test text
|
33 |
- 2.0.4: fix of "username exists" error message
|
34 |
- 2.0.3: fix bad Observer merge
|
46 |
- Version 1.0.2 - fix a bug with the installation
|
47 |
- Version 1.0.1 - fix bug in sql query during installation on prefixed tables, add german translation, do package for Magento version prior to 1.5 and version 1.5.x
|
48 |
- Version 1.0.0 - stable version</notes>
|
49 |
+
<authors><author><name>diglin</name><user>diglin</user><email>website@diglin.com</email></author></authors>
|
50 |
+
<date>2014-02-03</date>
|
51 |
+
<time>00:01:27</time>
|
52 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Diglin_Username.xml" hash="79603fae3def6dd098d4be51897e1ec6"/><file name="Hackathon_MageTrashApp.xml" hash="247c6b5278c3681efe24f504c5b48970"/></dir></target><target name="magecommunity"><dir name="Diglin"><dir name="Username"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Source"><file name="Hint.php" hash="0dc648be933060aa2399001829070b79"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="e830b16b7c7de00d5d93d246195a9551"/></dir><dir name="Model"><dir name="Config"><file name="Share.php" hash="e029c5424074d0ce28a2f2139a748dc3"/><dir name="Source"><file name="Inputvalidation.php" hash="6b9037b526f1ff976a07870143860291"/></dir></dir><file name="Customer.php" hash="960ea3f70df8e0cb4f495b2cf6d6e93e"/><dir name="Entity"><file name="Customer.php" hash="54627255257244df3b6103ec34a5d9cb"/><file name="Setup.php" hash="dad9545b28dd785f23ef59d48fdfec8a"/></dir><file name="Form.php" hash="8043425ea74991d257d5ad00a91dbfb2"/><dir name="Import"><dir name="Entity"><file name="Customer.php" hash="aa85749489175a6d595618609ca6619b"/></dir></dir><file name="Observer.php" hash="d2922eead0f0485b18d700bda2cc34de"/></dir><dir name="controllers"><file name="AccountController.php" hash="a8ab01bd291f779d1b5700de9c24218c"/></dir><dir name="data"><dir name="username_setup"><file name="data-install-2.0.0.php" hash="b80e44774725d1805774b2145b7635f3"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="17c135749877ba875eb061c16c5b0a34"/><file name="config.xml" hash="20e844986975107ffb3ba29771c875d3"/><file name="system.xml" hash="90651edfbc736daa84f540e5afa40fff"/><file name="uninstall.txt" hash="70ce51e6ea76f07394760ca567cd6294"/></dir><dir name="sql"><dir name="username_setup"><file name="install-2.0.0.php" hash="cb1d129962d2776c70542363c846b810"/><file name="mysql4-install-1.0.0.php" hash="ca05dc1cbee01889f8c511f363082be2"/><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="f5cf8a2c6d900844d358f77e32d37131"/><file name="mysql4-upgrade-1.1.0-1.2.0.php" hash="7f38c7d1f56406b19a7c534c72840005"/><file name="mysql4-upgrade-1.3.0-1.4.0.php" hash="d077137a9fba3524bbcc8ec3076e010c"/><file name="mysql4-upgrade-1.4.0-2.0.0.php" hash="4a26c28b54d3d87aed21328d625223ef"/><file name="uninstall.php" hash="4b1c8bb67bc8bca38afd6e2f3b93d116"/></dir></dir></dir></dir><dir name="Hackathon"><dir name="MageTrashApp"><dir name="Adminhtml"><dir name="Block"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Modules"><file name="MageTrashApp.php" hash="8dc018926d9478d2ee12b505033e312a"/></dir></dir></dir></dir></dir></dir></dir><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Modules"><file name="MageTrashApp.php" hash="190b72529aa16a61b6bc2490774304e3"/><file name="Rewind.php" hash="6a7d8004e79fd2f5226b2ca6f1a32d48"/></dir></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="6ea1f755b3470cd8254fec25977f08bd"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="Config"><file name="Data.php" hash="666da6fe6343b0bf38ac6313242871bc"/></dir></dir><file name="CoreResource.php" hash="48faa17486cbdb58b5b58e26a892bc8a"/><file name="Observer.php" hash="4edb98984908198865fd9a73fe15ccab"/><file name="PearWrapper.php" hash="5bfc49da1c0c4b8801217e1ece28b7e9"/><dir name="Resource"><file name="Resource.php" hash="ba46996c23e6c17db231fcfd7eeee1cd"/><file name="Setup.php" hash="01c3a067fb830edd7c2783b9a9b2d2bb"/></dir><file name="Uninstall.php" hash="e8fe01333bae1d1c187b7eb95568e903"/></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="71d4e2715f295ac097316e02736fc986"/></dir><dir name="Helper"><file name="DataTest.php" hash="7bfebdb2953dc220457240fd01503ab7"/></dir><dir name="Model"><file name="Observer.php" hash="fbd80ba2d0eb8c6058f1a45d00e476f5"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="indexController.php" hash="b4ea9f1b928458c1af902416b91300d0"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="29e4e7211061fb73eeceb1a6dc510dad"/><file name="config.xml" hash="767b2cd648240b07c858ef7282827571"/><file name="doc.uninstall.txt" hash="b2de80f292016c5392b0edbc21ac29f1"/><file name="system.xml" hash="ca750acb4682fc8edea2f5aa451278a5"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="username"><dir><dir name="checkout"><dir name="onepage"><dir name="13"><file name="billing.phtml" hash="e7875ec85ee418539807266e0f8d7581"/></dir><dir name="17"><file name="billing.phtml" hash="35a3604ae93631f7a6522f923d2d364d"/></dir><file name="billing.phtml" hash="da260e1dcfaf0c1200e8149dee2cd9b9"/><file name="login.phtml" hash="456f485f5c5b34f42ab7b3d6b842a336"/></dir></dir><dir name="customer"><dir name="account"><dir name="dashboard"><file name="info.phtml" hash="762e44bffe4596658d674500cf3aa8cd"/></dir></dir><dir name="form"><dir name="13"><file name="register.phtml" hash="3bb3748061cf515d09ca8f3a0283326d"/></dir><dir name="17"><file name="register.phtml" hash="57fb12c734a0e7842da56d64ac93fe67"/></dir><file name="edit.phtml" hash="271a5b40a1371683ba64849c2cf8ce54"/><file name="forgotpassword.phtml" hash="a672db46aae548b939a64d32ffccd772"/><file name="login.phtml" hash="43ac5db68fef36ff156f7592f3eb34bf"/><file name="register.phtml" hash="2a74a300edcf780acb804b8cd25c393e"/></dir></dir><dir name="persistent"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="d65b0f7f56959385c5b6e6379479be1e"/><file name="login.phtml" hash="9c82c47edb76c8782a482c3a592eecc4"/></dir></dir><dir name="customer"><dir name="form"><file name="login.phtml" hash="cb6ada4391b79e57cf3b9f9b15425732"/><file name="register.phtml" hash="215b85f826cd94ce17cbff17199b1435"/></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="username.xml" hash="432ef8d9bd05bdfedfae879c981ba95c"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_GB"><file name="Diglin_Username.csv" hash="2d18fb6bfc2c4c56f19cfe7ee6761f4b"/></dir><dir name="en_US"><file name="Diglin_Username.csv" hash="16a3bd3dc5e0336c0b3002e8439528e9"/></dir><dir name="fr_FR"><file name="Diglin_Username.csv" hash="d8d025c852649fc8e9edd2aed5ab377a"/></dir><dir name="de_DE"><file name="Diglin_Username.csv" hash="7a0aa81dbdafe2ef121a08cd03c64893"/></dir></target></contents>
|
53 |
<compatible/>
|
54 |
+
<dependencies><required><php><min>5.2.9</min><max>6.0.0</max></php></required></dependencies>
|
55 |
</package>
|