3 /* Copyright (C) 2009 Winch Gate Property Limited
5 * This file is part of ryzom_api.
6 * ryzom_api is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * ryzom_api is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with ryzom_api. If not, see <http://www.gnu.org/licenses/>.
24 function __construct($infos) {
25 $this->infos
= $infos;
30 if (array_key_exists($name, $this->infos
)) {
31 return $this->infos
[$name];
38 function inGroup($groups) {
39 $groups = explode(':', $groups);
40 foreach ($groups as $group) {
42 if (in_array($group, $this->groups
))
44 if ('P_'.$this->id
== $group)
46 if ('G_'.$this->guild_id
== $group)
56 function ryzom_auth_user($ask_login=true, $welcome_message='') {
59 $result = ryzom_app_authenticate($user, $ask_login, $welcome_message, true);
60 $_USER = new RyUser($user);