Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit b5883c1

Browse files
committed
Manual merge - close #1215
1 parent 3a36856 commit b5883c1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ext/joomla/3.0/user.pydio/pydio.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
define('AJXP_EXEC', true);
1313
jimport('joomla.event.plugin');
1414
jimport( 'joomla.registry.registry' );
15+
jimport( 'joomla.user.helper' );
1516

1617

1718
/**
@@ -133,13 +134,16 @@ public function onUserLogin($user, $options)
133134
$success = false;
134135
if(!$this->glueCodeFound) return false;
135136

137+
$juser = JFactory::getUser();
138+
$groups = JUserHelper::getUserGroups($juser->id);
139+
136140
global $AJXP_GLUE_GLOBALS;
137141
$AJXP_GLUE_GLOBALS = array();
138142
//$plugInAction, $login, $result, $secret, $autoCreate;
139143
$AJXP_GLUE_GLOBALS["secret"] = $this->secret;
140144
$AJXP_GLUE_GLOBALS["autoCreate"] = $this->autoCreate;
141145
$AJXP_GLUE_GLOBALS["plugInAction"] = "login";
142-
$AJXP_GLUE_GLOBALS["login"] = array("name"=>$user["username"], "password"=>$user["password"]);
146+
$AJXP_GLUE_GLOBALS["login"] = array("name"=>$user["username"], "password"=>$user["password"], "roles" => $groups);
143147
include($this->glueCode);
144148
new SessionSwitcher("previous", false, true);
145149
return true;

0 commit comments

Comments
 (0)