-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/develop' into REDSHOP-6083
- Loading branch information
Showing
44 changed files
with
529 additions
and
500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
<form action="{{ jroute('index.php') }}" method="post">{{ content }}</form> | ||
<form action="{{ jroute('index.php') }}" method="post">{{ content }}</form> | ||
{% if thirdPartyLogin|length > 0 %} | ||
<div class="third-party-login"> | ||
{% for login in thirdPartyLogin %} | ||
{% if login['plugin'] != '' %} | ||
<div class="row login-{{ login['plugin'] }}"> | ||
<a href="{{ login['linkLogin'] }}" class="btn btn-primary login-button"> | ||
{{ login['plugin']|title }} | ||
</a> | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
/** | ||
* @package RedShop | ||
* @subpackage Libraries | ||
* | ||
* @copyright Copyright (C) 2008 - 2019 redCOMPONENT.com. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE | ||
*/ | ||
|
||
namespace Redshop\Helper; | ||
|
||
defined('_JEXEC') or die; | ||
|
||
/** | ||
* Login helper class | ||
* | ||
* @since __DEPLOY_VERSION__ | ||
*/ | ||
class Login | ||
{ | ||
/** | ||
* @param $data | ||
* | ||
* @throws \Exception | ||
*/ | ||
public static function loginJoomlaRedShop($data) { | ||
$app = \JFactory::getApplication(); | ||
$jUser = \JUserHelper::getUserId($data['email']); | ||
|
||
if ($jUser > 0) { | ||
$jUser = \JFactory::getUser($jUser); | ||
|
||
\JPluginHelper::importPlugin('user'); | ||
|
||
$options = array(); | ||
$options['action'] = 'core.login.site'; | ||
|
||
$result = $app->triggerEvent('onUserLogin', array($data, $options)); | ||
} else { | ||
$jUser = \RedshopHelperJoomla::createJoomlaUser($data, 1); | ||
} | ||
|
||
$check = \RedshopHelperUser::getUserInformation($jUser->id); | ||
|
||
if (empty($check)) { | ||
$redUser = \RedshopHelperUser::storeRedshopUser($data, $jUser->id); | ||
} | ||
|
||
$app->redirect(\JUri::root()); | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public static function getThirdPartyLogin() { | ||
\JPluginHelper::importPlugin('redshop_login'); | ||
return \RedshopHelperUtility::getDispatcher()->trigger('onThirdPartyLogin'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.