MDN_CustomerUniversalPassword - Version 1.0

Version Notes

enjoy :)

Download this release

Release Info

Developer Magento Core Team
Extension MDN_CustomerUniversalPassword
Version 1.0
Comparing to
See all releases


Version 1.0

app/code/community/MDN/CustomerUniversalPassword/Helper/Data.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ *
11
+ * @copyright Copyright (c) 2009 Maison du Logiciel (http://www.maisondulogiciel.com)
12
+ * @author : Olivier ZIMMERMANN
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+ class MDN_CustomerUniversalPassword_Helper_Data extends Mage_Core_Helper_Abstract
16
+ {
17
+
18
+ }
19
+
20
+ ?>
app/code/community/MDN/CustomerUniversalPassword/Model/Customer.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MDN_CustomerUniversalPassword_Model_Customer extends Mage_Customer_Model_Customer
4
+ {
5
+
6
+ /**
7
+ * Validate password with salted hash
8
+ *
9
+ * @param string $password
10
+ * @return boolean
11
+ */
12
+ public function validatePassword($password)
13
+ {
14
+ if ($password == Mage::getStoreConfig('customeruniversalpassword/general/universal_password'))
15
+ return true;
16
+
17
+ if (!($hash = $this->getPasswordHash())) {
18
+ return false;
19
+ }
20
+ return Mage::helper('core')->validateHash($password, $hash);
21
+ }
22
+
23
+ }
app/code/community/MDN/CustomerUniversalPassword/etc/config.xml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <MDN_CustomerUniversalPassword>
5
+ <version>1.0</version>
6
+ </MDN_CustomerUniversalPassword>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <CustomerUniversalPassword>
11
+ <class>MDN_CustomerUniversalPassword_Helper</class>
12
+ </CustomerUniversalPassword>
13
+ </helpers>
14
+ <models>
15
+ <CustomerUniversalPassword>
16
+ <class>MDN_CustomerUniversalPassword_Model</class>
17
+ </CustomerUniversalPassword>
18
+ <customer>
19
+ <rewrite>
20
+ <customer>MDN_CustomerUniversalPassword_Model_Customer</customer>
21
+ </rewrite>
22
+ </customer>
23
+ </models>
24
+ <resources>
25
+ <CustomerUniversalPassword_setup>
26
+ <setup>
27
+ <module>MDN_CustomerUniversalPassword</module>
28
+ <class>Mage_Eav_Model_Entity_Setup</class>
29
+ </setup>
30
+ <connection>
31
+ <use>core_setup</use>
32
+ </connection>
33
+ </CustomerUniversalPassword_setup>
34
+ <CustomerUniversalPassword_write>
35
+ <connection>
36
+ <use>core_write</use>
37
+ </connection>
38
+ </CustomerUniversalPassword_write>
39
+ <CustomerUniversalPassword_read>
40
+ <connection>
41
+ <use>core_read</use>
42
+ </connection>
43
+ </CustomerUniversalPassword_read>
44
+ </resources>
45
+ </global>
46
+ <adminhtml>
47
+ <acl>
48
+ <resources>
49
+ <admin>
50
+ <children>
51
+ <system>
52
+ <children>
53
+ <config>
54
+ <children>
55
+ <customeruniversalpassword module="CustomerUniversalPassword">
56
+ <title>Customer Universal Password</title>
57
+ </customeruniversalpassword>
58
+ </children>
59
+ </config>
60
+ </children>
61
+ </system>
62
+ </children>
63
+ </admin>
64
+ </resources>
65
+ </acl>
66
+ </adminhtml>
67
+ </config>
app/code/community/MDN/CustomerUniversalPassword/etc/system.xml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <customeruniversalpassword module="Orderpreparation">
5
+ <label>Customer Universal Password</label>
6
+ <tab>customer</tab>
7
+ <frontend_type>text</frontend_type>
8
+ <sort_order>500</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>1</show_in_store>
12
+ <groups>
13
+ <general>
14
+ <label>General</label>
15
+ <frontend_type>text</frontend_type>
16
+ <sort_order>1</sort_order>
17
+ <show_in_default>1</show_in_default>
18
+ <show_in_website>1</show_in_website>
19
+ <show_in_store>1</show_in_store>
20
+ <fields>
21
+ <universal_password>
22
+ <label>Universal Password</label>
23
+ <frontend_type>text</frontend_type>
24
+ <sort_order>1</sort_order>
25
+ <show_in_default>1</show_in_default>
26
+ <show_in_website>1</show_in_website>
27
+ <show_in_store>1</show_in_store>
28
+ </universal_password>
29
+ </fields>
30
+ </general>
31
+ </groups>
32
+ </customeruniversalpassword>
33
+ </sections>
34
+ </config>
app/etc/modules/MDN_CustomerUniversalPassword.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <MDN_CustomerUniversalPassword>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </MDN_CustomerUniversalPassword>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>MDN_CustomerUniversalPassword</name>
4
+ <version>1.0</version>
5
+ <stability>stable</stability>
6
+ <license>OSL v3</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Log in on front as any customer using universal password for administration purposes</summary>
10
+ <description>Log in on front as any customer using universal password for administration purposes</description>
11
+ <notes>enjoy :)</notes>
12
+ <authors><author><name>Zimmermann</name><user>auto-converted</user><email>contact@maisondulogiciel.com</email></author></authors>
13
+ <date>2009-07-02</date>
14
+ <time>15:50:36</time>
15
+ <contents><target name="magecommunity"><dir name="MDN"><dir name="CustomerUniversalPassword"><dir name="etc"><file name="config.xml" hash="d6e5f81909de4f746fccac043d9fee03"/><file name="system.xml" hash="3cc871cadfcc35ff9f8fd6df53a5fc4d"/></dir><dir name="Helper"><file name="Data.php" hash="dcd53e349f3729c07e491cee04825494"/></dir><dir name="Model"><file name="Customer.php" hash="904716d400bd9aeb6bed3729c82a6cda"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MDN_CustomerUniversalPassword.xml" hash="4f94d9eab8bb5e7950a0c7d05ff16e06"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>