File indexing completed on 2024-04-28 05:53:54

0001 <?php
0002 
0003 /**
0004  *  ocs-webserver
0005  *
0006  *  Copyright 2016 by pling GmbH.
0007  *
0008  *    This file is part of ocs-webserver.
0009  *
0010  *    This program is free software: you can redistribute it and/or modify
0011  *    it under the terms of the GNU Affero General Public License as
0012  *    published by the Free Software Foundation, either version 3 of the
0013  *    License, or (at your option) any later version.
0014  *
0015  *    This program is distributed in the hope that it will be useful,
0016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
0017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0018  *    GNU Affero General Public License for more details.
0019  *
0020  *    You should have received a copy of the GNU Affero General Public License
0021  *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
0022  **/
0023 class Application_Model_DbTable_Member extends Local_Model_Table
0024 {
0025 
0026     const MEMBER_ACTIVE = 1;
0027     const MEMBER_INACTIVE = 0;
0028     const MEMBER_DELETED = 1;
0029     const MEMBER_NOT_DELETED = 0;
0030     const MEMBER_LOGIN_LOCAL = 'local';
0031     const MEMBER_LOGIN_FACEBOOK = 'facebook';
0032     const MEMBER_LOGIN_TWITTER = 'twitter';
0033     const MEMBER_MAIL_CHECKED = 1;
0034     const MEMBER_NOT_MAIL_CHECKED = 0;
0035     const MEMBER_DEFAULT_AVATAR = 'default-profile.png';
0036     const MEMBER_DEFAULT_PROFILE_IMAGE = '/images/system/default-profile.png';
0037     const MEMBER_TYPE_GROUP = 1;
0038     const MEMBER_TYPE_PERSON = 0;
0039     const ROLE_ID_MODERATOR = 400;
0040     const ROLE_ID_DEFAULT = 300;
0041     const ROLE_ID_STAFF = 200;
0042     const ROLE_ID_ADMIN = 100;
0043     const PROFILE_IMG_SRC_LOCAL = 'local';
0044     const SOURCE_LOCAL = 0;
0045     const SOURCE_HIVE = 1;
0046     const PASSWORD_TYPE_OCS = 0;
0047     const PASSWORD_TYPE_HIVE = 1;
0048     const MEMBER_AVATAR_TYPE_USERUPDATED = 2;
0049     protected $_keyColumnsForRow = array('member_id');
0050 
0051     protected $_key = 'member_id';
0052 
0053     protected $_name = "member";
0054 
0055     protected $_dependentTables = array('Application_Model_Project');
0056 
0057     protected $_referenceMap = array(
0058         'Owner' => array(
0059             'columns'       => 'member_id',
0060             'refTableClass' => 'Application_Model_Project',
0061             'refColumns'    => 'member_id'
0062         ),
0063         'Email' => array(
0064             'columns'       => 'member_id',
0065             'refTableClass' => 'Application_Model_DbTable_MemberEmail',
0066             'refColums'     => 'email_member_id'
0067         )
0068     );
0069 
0070 
0071     /**
0072      * @param array|string $member_id
0073      *
0074      * @return int|void
0075      * @throws Exception
0076      */
0077     public function delete($member_id)
0078     {
0079         throw new Exception('Deleting of users is not allowed.');
0080     }
0081 
0082 }