getOAuthService(); $data = []; // basic user data $json = $oauth->request($this->getConf('baseurl') . '/o/me?format=json'); $result = json_decode($json, true); $data['user'] = $result['id']; $data['name'] = $result['name']; $data['mail'] = $result['email']; if (isset($result['group']) && is_array($result['group'])) { foreach ($result['group'] as $id => $slug) { $data['grps'][] = $id; } } return $data; } /** @inheritDoc */ public function getScopes() { return ['read']; } /** @inheritDoc */ public function getLabel() { return $this->getConf('label', 'WECHANGE'); } /** @inheritDoc */ public function getColor() { return '#34b4b5'; } }