Permalink
Browse files

Manual merge - close #1215

  • Loading branch information...
1 parent 3a36856 commit b5883c1caab100a397671a6d67ee1fc72c583378 @cdujeu cdujeu committed Oct 3, 2016
Showing with 5 additions and 1 deletion.
  1. +5 −1 ext/joomla/3.0/user.pydio/pydio.php
@@ -12,6 +12,7 @@
define('AJXP_EXEC', true);
jimport('joomla.event.plugin');
jimport( 'joomla.registry.registry' );
+jimport( 'joomla.user.helper' );
/**
@@ -133,13 +134,16 @@ public function onUserLogin($user, $options)
$success = false;
if(!$this->glueCodeFound) return false;
+ $juser = JFactory::getUser();
+ $groups = JUserHelper::getUserGroups($juser->id);
+
global $AJXP_GLUE_GLOBALS;
$AJXP_GLUE_GLOBALS = array();
//$plugInAction, $login, $result, $secret, $autoCreate;
$AJXP_GLUE_GLOBALS["secret"] = $this->secret;
$AJXP_GLUE_GLOBALS["autoCreate"] = $this->autoCreate;
$AJXP_GLUE_GLOBALS["plugInAction"] = "login";
- $AJXP_GLUE_GLOBALS["login"] = array("name"=>$user["username"], "password"=>$user["password"]);
+ $AJXP_GLUE_GLOBALS["login"] = array("name"=>$user["username"], "password"=>$user["password"], "roles" => $groups);
include($this->glueCode);
new SessionSwitcher("previous", false, true);
return true;

0 comments on commit b5883c1

Please sign in to comment.