CODE STYLE class.groupUser.php
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* class.groupUser.php
|
* class.groupUser.php
|
||||||
|
*
|
||||||
* @package workflow.engine.ProcessMaker
|
* @package workflow.engine.ProcessMaker
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
@@ -13,13 +14,13 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
* It works with the table GROUP_USER
|
* It works with the table GROUP_USER
|
||||||
@@ -32,54 +33,60 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* GroupUser - GroupUser class
|
* GroupUser - GroupUser class
|
||||||
|
*
|
||||||
* @package workflow.engine.ProcessMaker
|
* @package workflow.engine.ProcessMaker
|
||||||
* @author Julio Cesar Laura Avendaño
|
* @author Julio Cesar Laura Avendaño
|
||||||
* @copyright 2007 COLOSA
|
* @copyright 2007 COLOSA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
G::LoadClass('pmObject');
|
G::LoadClass( 'pmObject' );
|
||||||
|
|
||||||
class GroupUser extends DBTable
|
class GroupUser extends DBTable
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
* @param object $oConnection
|
|
||||||
* @return variant
|
|
||||||
*/
|
|
||||||
function GroupUser($oConnection = null)
|
|
||||||
{
|
|
||||||
if ($oConnection){
|
|
||||||
return parent::setTo($oConnection, 'GROUP_USER', array('GRP_UID', 'USR_UID'));
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param object $oConnection
|
||||||
|
* @return variant
|
||||||
|
*/
|
||||||
|
function GroupUser ($oConnection = null)
|
||||||
|
{
|
||||||
|
if ($oConnection) {
|
||||||
|
return parent::setTo( $oConnection, 'GROUP_USER', array ('GRP_UID','USR_UID'
|
||||||
|
) );
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
* Set the Data Base connection
|
* Set the Data Base connection
|
||||||
* @param object $oConnection
|
* @param object $oConnection
|
||||||
* @return variant/ the connection or void
|
* @return variant/ the connection or void
|
||||||
*/
|
*/
|
||||||
function setTo($oConnection = null)
|
function setTo ($oConnection = null)
|
||||||
{
|
{
|
||||||
if ($oConnection) {
|
if ($oConnection) {
|
||||||
return parent::setTo($oConnection, 'GROUP_USER', array('GRP_UID', 'USR_UID'));
|
return parent::setTo( $oConnection, 'GROUP_USER', array ('GRP_UID','USR_UID'
|
||||||
} else {
|
) );
|
||||||
return;
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Of to assign a user from a group
|
* Of to assign a user from a group
|
||||||
* @param string $sGroup
|
*
|
||||||
* @param string $sUser
|
* @param string $sGroup
|
||||||
* @return void
|
* @param string $sUser
|
||||||
*/
|
* @return void
|
||||||
function ofToAssignUser($sGroup = '', $sUser = '')
|
*/
|
||||||
{
|
function ofToAssignUser ($sGroup = '', $sUser = '')
|
||||||
$this->Fields['GRP_UID'] = $sGroup;
|
{
|
||||||
$this->Fields['USR_UID'] = $sUser;
|
$this->Fields['GRP_UID'] = $sGroup;
|
||||||
parent::delete();
|
$this->Fields['USR_UID'] = $sUser;
|
||||||
}
|
parent::delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user