3 * FusionForge system authentication management
5 * Copyright 2012, Roland Mas
7 * This file is part of FusionForge. FusionForge is free software;
8 * you can redistribute it and/or modify it under the terms of the
9 * GNU General Public License as published by the Free Software
10 * Foundation; either version 2 of the Licence, or (at your option)
13 * FusionForge is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 abstract class SysAuthPlugin extends Plugin {
24 function SysAuthPlugin() {
26 $this->_addHook("user_create");
27 $this->_addHook("user_update");
28 $this->_addHook("user_delete");
29 $this->_addHook("user_setstatus");
30 $this->_addHook("user_setemail");
31 $this->_addHook("user_setpasswd");
32 $this->_addHook("group_create");
33 $this->_addHook("group_update");
34 $this->_addHook("group_delete");
35 $this->_addHook("group_adduser");
36 $this->_addHook("group_removeuser");
37 $this->_addHook("group_setstatus");
38 $this->_addHook("group_approved");
39 $this->_addHook("group_update_members");
42 function CallHook ($hookname, &$params) {
43 $this->$hookname($params);
46 abstract function user_update($params);
47 abstract function user_delete($params);
48 abstract function group_update($params);
49 abstract function group_delete($params);
51 function user_create($params) {
52 return $this->user_update($params);
54 function user_setstatus($params) {
55 return $this->user_update($params);
57 function user_setemail($params) {
58 return $this->user_update($params);
60 function user_setpasswd($params) {
61 return $this->user_update($params);
64 function group_create($params) {
65 return $this->group_update($params);
67 function group_adduser($params) {
68 return $this->group_update_members($params);
70 function group_removeuser($params) {
71 return $this->group_update_members($params);
73 function group_setstatus($params) {
74 return $this->group_update($params);
76 function group_approved($params) {
77 return $this->group_update($params);
79 function group_update_members($params) {
80 return $this->group_update($params);