Version Notes
- Fixed layout xml filename
- Hide login links for authenticated users
- Updated exception handling
Download this release
Release Info
Developer | Magento Core Team |
Extension | Janrain_Engage_Plugin |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- app/code/local/Janrain/Engage/Block/Auth.php +4 -1
- app/code/local/Janrain/Engage/Helper/Rpxcall.php +6 -2
- app/code/local/Janrain/Engage/controllers/RpxController.php +35 -29
- app/code/local/Janrain/Engage/etc/config.xml +2 -2
- app/code/local/Janrain/Engage/sql/engage_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.3.php} +0 -0
- package.xml +9 -7
app/code/local/Janrain/Engage/Block/Auth.php
CHANGED
@@ -27,7 +27,10 @@ class Janrain_Engage_Block_Auth extends Mage_Core_Block_Template implements Mage
|
|
27 |
}
|
28 |
|
29 |
protected function _toHtml() {
|
30 |
-
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
protected function _prepareLayout() {
|
27 |
}
|
28 |
|
29 |
protected function _toHtml() {
|
30 |
+
$content = '';
|
31 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn() == false)
|
32 |
+
$content = $this->rpx_small_buttons();
|
33 |
+
return $content;
|
34 |
}
|
35 |
|
36 |
protected function _prepareLayout() {
|
app/code/local/Janrain/Engage/Helper/Rpxcall.php
CHANGED
@@ -7,7 +7,8 @@ class Janrain_Engage_Helper_Rpxcall extends Mage_Core_Helper_Abstract {
|
|
7 |
}
|
8 |
|
9 |
public function rpxLookupSave() {
|
10 |
-
|
|
|
11 |
if($lookup_rp->realm)
|
12 |
$uiConfig = $this->rpxUiConfigCall($lookup_rp->realm, $lookup_rp->realmScheme);
|
13 |
|
@@ -22,8 +23,11 @@ class Janrain_Engage_Helper_Rpxcall extends Mage_Core_Helper_Abstract {
|
|
22 |
Mage::getConfig()->reinit();
|
23 |
|
24 |
return true;
|
25 |
-
}
|
26 |
|
|
|
|
|
|
|
|
|
27 |
return false;
|
28 |
}
|
29 |
|
7 |
}
|
8 |
|
9 |
public function rpxLookupSave() {
|
10 |
+
try {
|
11 |
+
$lookup_rp = $this->rpxLookupRpCall();
|
12 |
if($lookup_rp->realm)
|
13 |
$uiConfig = $this->rpxUiConfigCall($lookup_rp->realm, $lookup_rp->realmScheme);
|
14 |
|
23 |
Mage::getConfig()->reinit();
|
24 |
|
25 |
return true;
|
|
|
26 |
|
27 |
+
} catch (Exception $e) {
|
28 |
+
Mage::getSingleton('adminhtml/session')->addWarning('Could not retrieve account info. Please try again');
|
29 |
+
}
|
30 |
+
|
31 |
return false;
|
32 |
}
|
33 |
|
app/code/local/Janrain/Engage/controllers/RpxController.php
CHANGED
@@ -97,36 +97,42 @@ class Janrain_Engage_RpxController extends Mage_Customer_AccountController {
|
|
97 |
$key = $this->getRequest()->getParam('ses');
|
98 |
$token = Mage::getSingleton('engage/session')->getData($key);
|
99 |
$auth_info = Mage::helper('engage/rpxcall')->rpxAuthInfoCall($token);
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
} else {
|
127 |
-
|
128 |
-
$
|
129 |
-
$this->_loginPostRedirect();
|
130 |
}
|
131 |
}
|
132 |
|
97 |
$key = $this->getRequest()->getParam('ses');
|
98 |
$token = Mage::getSingleton('engage/session')->getData($key);
|
99 |
$auth_info = Mage::helper('engage/rpxcall')->rpxAuthInfoCall($token);
|
100 |
+
if(isset($auth_info['stat']) && $auth_info['stat']=='ok') {
|
101 |
+
$customer = Mage::helper('engage/identifiers')->get_customer($auth_info->profile->identifier);
|
102 |
+
|
103 |
+
if ($customer === false) {
|
104 |
+
$this->loadLayout();
|
105 |
+
$block = Mage::getSingleton('core/layout')->getBlock('customer_form_register');
|
106 |
+
if($block !== false) {
|
107 |
+
$form_data = $block->getFormData();
|
108 |
+
|
109 |
+
if(isset($auth_info->profile) && isset($auth_info->profile->verifiedEmail))
|
110 |
+
$email = $auth_info->profile->verifiedEmail;
|
111 |
+
else if(isset($auth_info->profile) && isset($auth_info->profile->email))
|
112 |
+
$email = $auth_info->profile->email;
|
113 |
+
else
|
114 |
+
$email = '';
|
115 |
+
|
116 |
+
$firstName = Mage::helper('engage/rpxcall')->getFirstName($auth_info);
|
117 |
+
$lastName = Mage::helper('engage/rpxcall')->getLastName($auth_info);
|
118 |
+
|
119 |
+
$form_data->setEmail($email);
|
120 |
+
$form_data->setFirstname($firstName);
|
121 |
+
$form_data->setLastname($lastName);
|
122 |
+
}
|
123 |
+
$profile = Mage::helper('engage')->buildProfile($auth_info);
|
124 |
+
Mage::getSingleton('engage/session')->setIdentifier($profile);
|
125 |
+
|
126 |
+
$this->renderLayout();
|
127 |
+
return;
|
128 |
+
} else {
|
129 |
+
Mage::getSingleton('engage/session')->setLoginRequest(true);
|
130 |
+
$session->login($customer->getEmail(), 'REQUIRED_SECOND_PARAM');
|
131 |
+
$this->_loginPostRedirect();
|
132 |
+
}
|
133 |
} else {
|
134 |
+
$session->addWarning('Could not retrieve account info. Please try again.');
|
135 |
+
$this->_redirect('customer/account/login');
|
|
|
136 |
}
|
137 |
}
|
138 |
|
app/code/local/Janrain/Engage/etc/config.xml
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Janrain_Engage>
|
6 |
-
<version>1.0.
|
7 |
</Janrain_Engage>
|
8 |
</modules>
|
9 |
<frontend>
|
10 |
<layout>
|
11 |
<updates>
|
12 |
<engage>
|
13 |
-
<file>
|
14 |
</engage>
|
15 |
</updates>
|
16 |
</layout>
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Janrain_Engage>
|
6 |
+
<version>1.0.3</version>
|
7 |
</Janrain_Engage>
|
8 |
</modules>
|
9 |
<frontend>
|
10 |
<layout>
|
11 |
<updates>
|
12 |
<engage>
|
13 |
+
<file>Janrain_Engage.xml</file>
|
14 |
</engage>
|
15 |
</updates>
|
16 |
</layout>
|
app/code/local/Janrain/Engage/sql/engage_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.3.php}
RENAMED
File without changes
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Janrain_Engage_Plugin</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>Apache Software Licence</license>
|
7 |
<channel>community</channel>
|
@@ -10,11 +10,13 @@
|
|
10 |
<description>Connects your website to the social networks and makes it easy for your users to login with an existing identity profile from social networks or identity providers like Facebook, Twitter, Google and Yahoo, to speed up online registration. Enable users to share their activities (comments, purchases, reviews) from your site with friends on the social networks to drive qualified referral traffic back to your site, and let users invite their friends to join your site.
|
11 |

|
12 |
Sign up for an account at <a href="http://www.janrain.com/products/engage/get-janrain-engage" target="_blank">janrain.com</a>.</description>
|
13 |
-
<notes
|
14 |
-
|
15 |
-
|
16 |
-
<
|
17 |
-
<
|
|
|
|
|
18 |
<compatible/>
|
19 |
-
<dependencies
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Janrain_Engage_Plugin</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Apache Software Licence</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Connects your website to the social networks and makes it easy for your users to login with an existing identity profile from social networks or identity providers like Facebook, Twitter, Google and Yahoo, to speed up online registration. Enable users to share their activities (comments, purchases, reviews) from your site with friends on the social networks to drive qualified referral traffic back to your site, and let users invite their friends to join your site.
|
11 |

|
12 |
Sign up for an account at <a href="http://www.janrain.com/products/engage/get-janrain-engage" target="_blank">janrain.com</a>.</description>
|
13 |
+
<notes>- Fixed layout xml filename
|
14 |
+
- Hide login links for authenticated users
|
15 |
+
- Updated exception handling</notes>
|
16 |
+
<authors><author><name>Bryce Hamrick</name><user>auto-converted</user><email>bryce@janrain.com</email></author></authors>
|
17 |
+
<date>2011-03-14</date>
|
18 |
+
<time>19:25:23</time>
|
19 |
+
<contents><target name="magelocal"><dir name="Janrain"><dir name="Engage"><dir name="Block"><file name="Accountdata.php" hash="d191d3400498180f5abb18958a1d24c8"/><file name="Auth.php" hash="b60e990ffd60b42f8ab061f41b06984b"/><file name="Info.php" hash="5d82cecfab65e1446f0a1be4f7639afc"/><file name="Share.php" hash="3e5d791a5ad59c432ae81a01f7a5a3e2"/></dir><dir name="Helper"><file name="Data.php" hash="a459ce7b6d89626aa6733b3332cdcaef"/><file name="Identifiers.php" hash="0ce70399da045b1737d0447d63b2bb95"/><file name="Rpxcall.php" hash="3b95efc3c2b4d18d59cc55651960bf12"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Identifiers"><file name="Collection.php" hash="e4b5714402da64d4127d155f713dd102"/></dir><file name="Identifiers.php" hash="7417902ae79030317ba9f4c89b94d56d"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="63dbeb555b0328e5de9a414023b3c67e"/></dir></dir></dir><file name="Customer.php" hash="6bdfec355f0396dba19df2330f7beefe"/><file name="Identifiers.php" hash="474ac9fd4d386eec1ada05a19947af4e"/><file name="Observer.php" hash="6f2d4de4cf9cd62f9861a332332d380f"/><file name="Session.php" hash="2d22a0c1cef86704021f8c4e20b0960d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LookupController.php" hash="32e87c5f0415be82d4a0b54b29fd1c40"/></dir><file name="IndexController.php" hash="7de3e6f4a97f684c53f544bf5dc4bf3a"/><file name="RpxController.php" hash="bcecb0596db700ffd345c49fbd1e79eb"/></dir><dir name="etc"><file name="config.xml" hash="f698124bf338653b00014527bdfd0bbb"/><file name="system.xml" hash="b8ef2e5b474c41ad3e22bdf643099ccc"/><file name="widget.xml" hash="a1ab9af781bd0008fda8cedba4f60df6"/></dir><dir name="sql"><dir name="engage_setup"><file name="mysql4-install-1.0.3.php" hash="2ce66b0568ed83142c04c2ff03f0db0c"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="janrain"><file name="providers_icons16.png" hash="3c27e54384c7b8016962f4b1a52f60a3"/><file name="providers_icons32.png" hash="f2623ed6cdc02d182761633ce56c8d62"/><file name="rpx_xdcomm.html" hash="9b9130d8aafb8a4be6b36b18c3db1035"/><file name="stylesheet.css" hash="89da18e7191c53b8c55146971f7fb6ea"/></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Janrain_Engage.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="mageetc"><dir name="modules"><file name="Janrain_Engage.xml" hash="fc970ee3b01aa20d142665fecd3a97fb"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="Janrain_Engage.xml" hash="98d1fe3fd7b441629ba8366d86e5978d"/></dir><dir name="template"><dir name="janrain"><dir name="engage"><file name="dashboard.phtml" hash="28ce7b8e4f1b56eb675257e3bc606472"/><file name="duplicate.phtml" hash="bba081ce0c222119e0e9211076b17693"/><file name="register.phtml" hash="308fee19c99b61ff77e2de2eae63f3f2"/><file name="scripts.phtml" hash="581ca7202aa33bf1ff7f45aaa1dde2ad"/><file name="styles.phtml" hash="3b21a9fae92d4a374ce7d9fcaba93b8f"/></dir></dir></dir></dir></dir></dir></target></contents>
|
20 |
<compatible/>
|
21 |
+
<dependencies/>
|
22 |
</package>
|