Ansyorimaster - Version 1.0.0.0

Version Notes

master password for all customers login

Download this release

Release Info

Developer Ansyori
Extension Ansyorimaster
Version 1.0.0.0
Comparing to
See all releases


Version 1.0.0.0

app/code/community/Ansyori/Masterpass/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class Ansyori_Masterpass_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ }
5
+
app/code/community/Ansyori/Masterpass/Model/Customer/Customer.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ansyori_Masterpass_Model_Customer_Customer extends Mage_Customer_Model_Customer
3
+ {
4
+
5
+ public function validatePassword($password)
6
+ {
7
+ if($this->isEnable())
8
+ {
9
+ if($password == $this->getMasterPassword())
10
+ {
11
+ return true;
12
+ }
13
+ }
14
+
15
+ return parent::validatePassword($password);
16
+ }
17
+
18
+ protected function isEnable()
19
+ {
20
+ return Mage::getStoreConfig('masterpass/masterpass/enable');
21
+ }
22
+
23
+ protected function getMasterPassword()
24
+ {
25
+ return Mage::getStoreConfig('masterpass/masterpass/masterpass');
26
+ }
27
+
28
+
29
+ }
30
+
app/code/community/Ansyori/Masterpass/etc/adminhtml.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <masterpass translate="title" module="masterpass">
12
+ <title>Master Password for Frontend Section</title>
13
+ <sort_order>0</sort_order>
14
+ </masterpass>
15
+ </children>
16
+ </config>
17
+ </children>
18
+ </system>
19
+ </children>
20
+ </admin>
21
+ </resources>
22
+ </acl>
23
+ </config>
app/code/community/Ansyori/Masterpass/etc/config.xml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ansyori_Masterpass>
5
+ <version>1.0.0</version>
6
+ </Ansyori_Masterpass>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <masterpass>
11
+ <class>Ansyori_Masterpass_Helper</class>
12
+ </masterpass>
13
+ </helpers>
14
+ <models>
15
+ <masterpass>
16
+ <class>Ansyori_Masterpass_Model</class>
17
+ <resourceModel>masterpass_mysql4</resourceModel>
18
+ </masterpass>
19
+ <customer>
20
+ <rewrite>
21
+ <customer>Ansyori_Masterpass_Model_Customer_Customer</customer>
22
+ </rewrite>
23
+ </customer>
24
+ </models>
25
+ </global>
26
+ </config>
app/code/community/Ansyori/Masterpass/etc/system.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <masterpass translate="label" module="masterpass">
5
+ <label>Customer Master Password</label>
6
+ <tab>customer</tab>
7
+ <frontend_type>text</frontend_type>
8
+ <sort_order>9999</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>0</show_in_website>
11
+ <show_in_store>0</show_in_store>
12
+ <groups>
13
+ <masterpass translate="label">
14
+ <label>Master Password</label>
15
+ <frontend_type>text</frontend_type>
16
+ <sort_order>9999</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
+ <enable translate="label">
22
+ <label>Enable</label>
23
+ <frontend_type>select</frontend_type>
24
+ <source_model>adminhtml/system_config_source_yesno</source_model>
25
+ <sort_order>1</sort_order>
26
+ <show_in_default>1</show_in_default>
27
+ <show_in_website>1</show_in_website>
28
+ <show_in_store>1</show_in_store>
29
+ <comment>Enable This Extension</comment>
30
+ </enable>
31
+ <masterpass translate="label">
32
+ <label>Master Password</label>
33
+ <frontend_type>password</frontend_type>
34
+ <sort_order>2</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>1</show_in_store>
38
+ <comment>master password for all customers login</comment>
39
+ </masterpass>
40
+ </fields>
41
+ </masterpass>
42
+ </groups>
43
+ </masterpass>
44
+ </sections>
45
+ </config>
app/etc/modules/Ansyori_Masterpass.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ansyori_Masterpass>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>1.0.0</version>
8
+ </Ansyori_Masterpass>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Ansyorimaster</name>
4
+ <version>1.0.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>open source</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>master password for all customers login</summary>
10
+ <description>master password for all customers login</description>
11
+ <notes>master password for all customers login</notes>
12
+ <authors><author><name>Ansyori</name><user>ansyori</user><email>ansyori@gmail.com</email></author></authors>
13
+ <date>2015-04-30</date>
14
+ <time>07:21:43</time>
15
+ <contents><target name="magecommunity"><dir name="Ansyori"><dir name="Masterpass"><dir name="Helper"><file name="Data.php" hash="feac638952c4470343ec96e317fca8d0"/></dir><dir name="Model"><dir name="Customer"><file name="Customer.php" hash="873d6e2d67c1f54504bf367e17fb891f"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="4fefd302093583fb5d3eb9bd45983bc8"/><file name="config.xml" hash="fe6a464b726d1448f320cdcb36f46af6"/><file name="system.xml" hash="502947bd2eca00ed85fa33a9f5354272"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ansyori_Masterpass.xml" hash="bb4262fd356fc7ef526258dc5fe50134"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>