TS_Auto_Login_MailChimp - Version 1.0.23

Version Notes

Fix: Stop showing message of "Invalid parameter or nonexistent user." and "Invalid or nonexistente user."

Now its possible to log in on Magento through a simple url not need anymore to link to the controller.

Update with the last version of Ebizmarts 1.0.23.

Download this release

Release Info

Developer Thiago Santos
Extension TS_Auto_Login_MailChimp
Version 1.0.23
Comparing to
See all releases


Code changes from version 1.0.22 to 1.0.23

app/code/local/ThiagoSantos/LoginAutomatico/Model/Pageload/Observer.php CHANGED
@@ -26,27 +26,29 @@ class ThiagoSantos_LoginAutomatico_Model_Pageload_Observer {
26
  $url = $this -> getRequest() -> getParam('r');
27
  $store = $this -> getRequest() -> getParam('___store');
28
 
29
- if (!isset($id)) {
30
- $session -> addError('Parameter invalid or nonexistent user.');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
32
-
33
- //0 - id //1 - email
34
- $csv = Mage::helper('loginautomatico') -> decrypt($id);
35
- $_customerinfo = explode(';', $csv);
36
-
37
- $customer = Mage::getModel('customer/customer') -> load($_customerinfo[0]);
38
-
39
- //Verifica se o email bate com o email que foi criptografado
40
- if (!$customer -> getId() || $customer -> getEmail() != trim($_customerinfo[1])) {
41
- $session -> addError('Usuário inválido ou inexistente');
42
- //$this -> _redirect('/');
43
- }
44
-
45
- $session = Mage::getSingleton('customer/session');
46
- //logout - necessário!
47
- $session -> logout();
48
- //logando novamente
49
- $session -> setCustomer($customer);
50
 
51
  }
52
 
26
  $url = $this -> getRequest() -> getParam('r');
27
  $store = $this -> getRequest() -> getParam('___store');
28
 
29
+ if(isset($id)){
30
+ /*if (!isset($id)) {
31
+ $session -> addError('Invalid parameter or nonexistent user.');
32
+ }*/
33
+
34
+ //0 - id //1 - email
35
+ $csv = Mage::helper('loginautomatico') -> decrypt($id);
36
+ $_customerinfo = explode(';', $csv);
37
+
38
+ $customer = Mage::getModel('customer/customer') -> load($_customerinfo[0]);
39
+
40
+ //Verifica se o email bate com o email que foi criptografado
41
+ if (!$customer -> getId() || $customer -> getEmail() != trim($_customerinfo[1])) {
42
+ $session -> addError('Invalid or nonexistentuser.');
43
+ //$this -> _redirect('/');
44
+ }
45
+
46
+ $session = Mage::getSingleton('customer/session');
47
+ //logout - necessário!
48
+ $session -> logout();
49
+ //logando novamente
50
+ $session -> setCustomer($customer);
51
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  }
54
 
package.xml CHANGED
@@ -1,21 +1,23 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TS_Auto_Login_MailChimp</name>
4
- <version>1.0.22</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Auto login for MailChimp on Magento Store</summary>
10
  <description>With this extension you will be able to export a custom Merge Tag for MailChimp and use as a parameters to logged in your customer on you store. This extesion use Magento Crypt to crypt and decrypt the value of the Merge Tag. For those dont know about it, each Magento installation have a unique phrase used to crypt some data. So "thiagosantos" string crypted using my Magento instalation will have a diferent return string, of doing the same on your own store. This make my extension much secured and very usefull.</description>
11
- <notes>Now its possible to log in on Magento through a simple url not need anymore to link to the controller.&#xD;
12
  &#xD;
13
- Update with the last version of Ebizmarts 1.0.22.&#xD;
 
 
14
  </notes>
15
  <authors><author><name>Thiago Santos</name><user>thiagosantos</user><email>thiagorow@gmail.com</email></author></authors>
16
- <date>2012-09-28</date>
17
- <time>14:35:25</time>
18
- <contents><target name="magelocal"><dir name="ThiagoSantos"><dir name="LoginAutomatico"><dir name="Helper"><file name="Data.php" hash="16e7f6ff44e1b4b2d232bebb5ea796e7"/><file name="MonkeyData.php" hash="689e322b12f84b75c161323ba26853e1"/></dir><dir name="Model"><dir name="Pageload"><file name="Observer.php" hash="6b72ed7efccb88dc4809f75e71bd6e10"/></dir></dir><dir name="controllers"><file name="AController.php" hash="ac825fbe7d20a48094b838d8bdd45a9b"/></dir><dir name="etc"><file name="config.xml" hash="3648f71839bf96a387702dda6dae9d8a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ThiagoSantos_LoginAutomatico.xml" hash="0329b656ce44c8b877d5ff267fbd2406"/></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TS_Auto_Login_MailChimp</name>
4
+ <version>1.0.23</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Auto login for MailChimp on Magento Store</summary>
10
  <description>With this extension you will be able to export a custom Merge Tag for MailChimp and use as a parameters to logged in your customer on you store. This extesion use Magento Crypt to crypt and decrypt the value of the Merge Tag. For those dont know about it, each Magento installation have a unique phrase used to crypt some data. So "thiagosantos" string crypted using my Magento instalation will have a diferent return string, of doing the same on your own store. This make my extension much secured and very usefull.</description>
11
+ <notes>Fix: Stop showing message of "Invalid parameter or nonexistent user." and "Invalid or nonexistente user."&#xD;
12
  &#xD;
13
+ Now its possible to log in on Magento through a simple url not need anymore to link to the controller.&#xD;
14
+ &#xD;
15
+ Update with the last version of Ebizmarts 1.0.23.&#xD;
16
  </notes>
17
  <authors><author><name>Thiago Santos</name><user>thiagosantos</user><email>thiagorow@gmail.com</email></author></authors>
18
+ <date>2012-11-26</date>
19
+ <time>11:46:49</time>
20
+ <contents><target name="magelocal"><dir name="ThiagoSantos"><dir name="LoginAutomatico"><dir name="Helper"><file name="Data.php" hash="16e7f6ff44e1b4b2d232bebb5ea796e7"/><file name="MonkeyData.php" hash="689e322b12f84b75c161323ba26853e1"/></dir><dir name="Model"><dir name="Pageload"><file name="Observer.php" hash="b9f030d34e21932cf8de7d535cddb37d"/></dir></dir><dir name="controllers"><file name="AController.php" hash="ac825fbe7d20a48094b838d8bdd45a9b"/></dir><dir name="etc"><file name="config.xml" hash="3648f71839bf96a387702dda6dae9d8a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ThiagoSantos_LoginAutomatico.xml" hash="0329b656ce44c8b877d5ff267fbd2406"/></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
23
  </package>