CRM-14684 refactor function that identifies is a site supports back-office contributions
[civicrm-core.git] / CRM / Member / Page / Tab.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
06b69b18 4 | CiviCRM version 4.5 |
6a488035 5 +--------------------------------------------------------------------+
06b69b18 6 | Copyright CiviCRM LLC (c) 2004-2014 |
6a488035
TO
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
26*/
27
28/**
29 *
30 * @package CRM
06b69b18 31 * @copyright CiviCRM LLC (c) 2004-2014
6a488035
TO
32 * $Id$
33 *
34 */
35class CRM_Member_Page_Tab extends CRM_Core_Page {
36
37 /**
38 * The action links that we need to display for the browse screen
39 *
40 * @var array
41 * @static
42 */
43 static $_links = NULL;
44 static $_membershipTypesLinks = NULL;
45
46 public $_permission = NULL;
47 public $_contactId = NULL;
48
49 /**
50 * This function is called when action is browse
51 *
52 * return null
53 * @access public
54 */
55 function browse() {
56 $links = self::links('all', $this->_isPaymentProcessor, $this->_accessContribution);
57
8d8bd076 58 $membership = array();
59 $dao = new CRM_Member_DAO_Membership();
6a488035 60 $dao->contact_id = $this->_contactId;
8d8bd076 61 $dao->is_test = 0;
6a488035
TO
62 //$dao->orderBy('name');
63 $dao->find();
64
65 //CRM--4418, check for view, edit, delete
66 $permissions = array(CRM_Core_Permission::VIEW);
67 if (CRM_Core_Permission::check('edit memberships')) {
68 $permissions[] = CRM_Core_Permission::EDIT;
69 }
70 if (CRM_Core_Permission::check('delete in CiviMember')) {
71 $permissions[] = CRM_Core_Permission::DELETE;
72 }
73 $mask = CRM_Core_Action::mask($permissions);
74
75 // get deceased status id
76 $allStatus = CRM_Member_PseudoConstant::membershipStatus();
77 $deceasedStatusId = array_search('Deceased', $allStatus);
78
79 //get all campaigns.
80 $allCampaigns = CRM_Campaign_BAO_Campaign::getCampaigns(NULL, NULL, FALSE, FALSE, FALSE, TRUE);
81
82 //checks membership of contact itself
83 while ($dao->fetch()) {
84 $membership[$dao->id] = array();
85 CRM_Core_DAO::storeValues($dao, $membership[$dao->id]);
86
87 //carry campaign.
88 $membership[$dao->id]['campaign'] = CRM_Utils_Array::value($dao->campaign_id, $allCampaigns);
89
90 //get the membership status and type values.
91 $statusANDType = CRM_Member_BAO_Membership::getStatusANDTypeValues($dao->id);
8d8bd076 92 foreach (array('status', 'membership_type') as $fld) {
6a488035
TO
93 $membership[$dao->id][$fld] = CRM_Utils_Array::value($fld, $statusANDType[$dao->id]);
94 }
a7488080 95 if (!empty($statusANDType[$dao->id]['is_current_member'])) {
6a488035
TO
96 $membership[$dao->id]['active'] = TRUE;
97 }
98 if (empty($dao->owner_membership_id)) {
99 // unset renew and followup link for deceased membership
100 $currentMask = $mask;
101 if ($dao->status_id == $deceasedStatusId) {
102 $currentMask = $currentMask & ~CRM_Core_Action::RENEW & ~CRM_Core_Action::FOLLOWUP;
103 }
104
8d8bd076 105 $isUpdateBilling = FALSE;
106 $paymentObject = CRM_Financial_BAO_PaymentProcessor::getProcessorForEntity(
107 $membership[$dao->id]['membership_id'], 'membership', 'obj');
6a488035
TO
108 if (!empty($paymentObject)) {
109 $isUpdateBilling = $paymentObject->isSupported('updateSubscriptionBillingInfo');
110 }
111
8d8bd076 112 $isCancelSupported = CRM_Member_BAO_Membership::isCancelSubscriptionSupported(
113 $membership[$dao->id]['membership_id']);
6a488035
TO
114
115 $membership[$dao->id]['action'] = CRM_Core_Action::formLink(self::links('all',
116 NULL,
117 NULL,
118 $isCancelSupported,
119 $isUpdateBilling
120 ),
121 $currentMask,
122 array(
123 'id' => $dao->id,
124 'cid' => $this->_contactId,
87dab4a4
AH
125 ),
126 ts('more'),
127 FALSE,
128 'membership.tab.row',
129 'Membership',
130 $dao->id
6a488035
TO
131 );
132 }
133 else {
134 $membership[$dao->id]['action'] = CRM_Core_Action::formLink(self::links('view'),
135 $mask,
136 array(
137 'id' => $dao->id,
138 'cid' => $this->_contactId,
87dab4a4
AH
139 ),
140 ts('more'),
141 FALSE,
142 'membership.tab.row',
143 'Membership',
144 $dao->id
6a488035
TO
145 );
146 }
147
148 //does membership have auto renew CRM-7137.
a7488080 149 if (!empty($membership[$dao->id]['contribution_recur_id']) &&
6a488035
TO
150 !CRM_Member_BAO_Membership::isSubscriptionCancelled($membership[$dao->id]['membership_id'])
151 ) {
152 $membership[$dao->id]['auto_renew'] = 1;
153 }
154 else {
155 $membership[$dao->id]['auto_renew'] = 0;
156 }
157
158 // if relevant, count related memberships
8d8bd076 159 if (CRM_Utils_Array::value('is_current_member', $statusANDType[$dao->id]) // membership is active
160 && CRM_Utils_Array::value('relationship_type_id', $statusANDType[$dao->id]) // membership type allows inheritance
161 && empty($dao->owner_membership_id)
162 ) { // not an related membership
6a488035
TO
163 $query = "
164 SELECT COUNT(m.id)
165 FROM civicrm_membership m
166 LEFT JOIN civicrm_membership_status ms ON ms.id = m.status_id
86c838ac
CW
167 LEFT JOIN civicrm_contact ct ON ct.id = m.contact_id
168 WHERE m.owner_membership_id = {$dao->id} AND m.is_test = 0 AND ms.is_current_member = 1 AND ct.is_deleted = 0";
6a488035
TO
169 $num_related = CRM_Core_DAO::singleValueQuery($query);
170 $max_related = CRM_Utils_Array::value('max_related', $membership[$dao->id]);
171 $membership[$dao->id]['related_count'] = ($max_related == '' ?
172 ts('%1 created', array(1 => $num_related)) :
173 ts('%1 out of %2', array(1 => $num_related, 2 => $max_related))
174 );
8d8bd076 175 }
176 else {
6a488035
TO
177 $membership[$dao->id]['related_count'] = ts('N/A');
178 }
179 }
180
181 //Below code gives list of all Membership Types associated
182 //with an Organization(CRM-2016)
183 $membershipTypes = CRM_Member_BAO_MembershipType::getMembershipTypesByOrg($this->_contactId);
184 foreach ($membershipTypes as $key => $value) {
185 $membershipTypes[$key]['action'] = CRM_Core_Action::formLink(self::membershipTypeslinks(),
186 $mask,
187 array(
188 'id' => $value['id'],
189 'cid' => $this->_contactId,
87dab4a4
AH
190 ),
191 ts('more'),
192 FALSE,
193 'membershipType.organization.action',
194 'MembershipType',
195 $value['id']
6a488035
TO
196 );
197 }
198
199 $activeMembers = CRM_Member_BAO_Membership::activeMembers($membership);
200 $inActiveMembers = CRM_Member_BAO_Membership::activeMembers($membership, 'inactive');
201 $this->assign('activeMembers', $activeMembers);
202 $this->assign('inActiveMembers', $inActiveMembers);
203 $this->assign('membershipTypes', $membershipTypes);
204
205 if ($this->_contactId) {
206 $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId);
207 $this->assign('displayName', $displayName);
4e8065a9 208 $this->ajaxResponse['tabCount'] = CRM_Contact_BAO_Contact::getCountComponent('membership', $this->_contactId);
fa9fbb61 209 // Refresh other tabs with related data
2840a035
CW
210 $this->ajaxResponse['updateTabs'] = array(
211 '#tab_contribute' => CRM_Contact_BAO_Contact::getCountComponent('contribution', $this->_contactId),
fa9fbb61
CW
212 '#tab_activity' => CRM_Contact_BAO_Contact::getCountComponent('activity', $this->_contactId),
213 '#tab_rel' => CRM_Contact_BAO_Contact::getCountComponent('rel', $this->_contactId),
2840a035 214 );
6a488035
TO
215 }
216 }
217
218 /**
219 * This function is called when action is view
220 *
221 * return null
222 * @access public
223 */
224 function view() {
225 $controller = new CRM_Core_Controller_Simple(
226 'CRM_Member_Form_MembershipView',
227 ts('View Membership'),
228 $this->_action
229 );
230 $controller->setEmbedded(TRUE);
231 $controller->set('id', $this->_id);
232 $controller->set('cid', $this->_contactId);
233
234 return $controller->run();
235 }
236
237 /**
238 * This function is called when action is update or new
239 *
240 * return null
241 * @access public
242 */
243 function edit() {
244 // set https for offline cc transaction
245 $mode = CRM_Utils_Request::retrieve('mode', 'String', $this);
246 if ($mode == 'test' || $mode == 'live') {
247 CRM_Utils_System::redirectToSSL();
248 }
249
8d8bd076 250 // build associated contributions ( note: this is called to show associated contributions in edit mode )
251 if ($this->_action & CRM_Core_Action::UPDATE) {
252 $this->assign('accessContribution', FALSE);
253 if (CRM_Core_Permission::access('CiviContribute')) {
254 $this->assign('accessContribution', TRUE);
255 CRM_Member_Page_Tab::associatedContribution($this->_contactId, $this->_id);
eb3cfcd6 256
257 //show associated soft credit when contribution payment is paid by different person in edit mode
258 if ($this->_id && $this->_contactId) {
259 $filter = " AND cc.id IN (SELECT contribution_id FROM civicrm_membership_payment WHERE membership_id = {$this->_id})";
260 $softCreditList = CRM_Contribute_BAO_ContributionSoft::getSoftContributionList($this->_contactId, $filter);
261 if (!empty($softCreditList)) {
262 $this->assign('softCredit', TRUE);
263 $this->assign('softCreditRows', $softCreditList);
264 }
265 }
8d8bd076 266 }
6a488035
TO
267 }
268
269 if ($this->_action & CRM_Core_Action::RENEW) {
270 $path = 'CRM_Member_Form_MembershipRenewal';
271 $title = ts('Renew Membership');
272 }
273 else {
274 $path = 'CRM_Member_Form_Membership';
275 $title = ts('Create Membership');
276 }
8d8bd076 277
278 $controller = new CRM_Core_Controller_Simple($path, $title, $this->_action);
6a488035
TO
279 $controller->setEmbedded(TRUE);
280 $controller->set('BAOName', $this->getBAOName());
281 $controller->set('id', $this->_id);
282 $controller->set('cid', $this->_contactId);
283 return $controller->run();
284 }
285
286 function preProcess() {
8d8bd076 287 $context = CRM_Utils_Request::retrieve('context', 'String', $this);
6a488035 288 $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
8d8bd076 289 $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
6a488035
TO
290
291 if ($context == 'standalone') {
292 $this->_action = CRM_Core_Action::ADD;
293 }
294 else {
295 $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);
296 $this->assign('contactId', $this->_contactId);
297
298 // check logged in url permission
299 CRM_Contact_Page_View::checkUserPermission($this);
300
301 // set page title
302 CRM_Contact_Page_View::setTitle($this->_contactId);
303 }
304
305 $this->assign('action', $this->_action);
306
307 if ($this->_permission == CRM_Core_Permission::EDIT && !CRM_Core_Permission::check('edit memberships')) {
308 // demote to view since user does not have edit membership rights
309 $this->_permission = CRM_Core_Permission::VIEW;
310 $this->assign('permission', 'view');
311 }
312 }
313
314 /**
315 * This function is the main function that is called when the page loads, it decides the which action has to be taken for the page.
316 *
317 * return null
318 * @access public
319 */
320 function run() {
321 $this->preProcess();
322
323 // check if we can process credit card membership
9be1374d
EM
324 $newCredit = CRM_Core_Config::isEnabledBackOfficeCreditCardPayments();
325 $this->assign('newCredit', $newCredit);
326
6a488035
TO
327 if ($newCredit) {
328 $this->_isPaymentProcessor = TRUE;
329 }
330 else {
331 $this->_isPaymentProcessor = FALSE;
332 }
333
334 // Only show credit card membership signup if user has CiviContribute permission
335 if (CRM_Core_Permission::access('CiviContribute')) {
336 $this->_accessContribution = TRUE;
337 $this->assign('accessContribution', TRUE);
91ef9be0 338
339 //show associated soft credit when contribution payment is paid by different person
340 if ($this->_id && $this->_contactId) {
341 $filter = " AND cc.id IN (SELECT contribution_id FROM civicrm_membership_payment WHERE membership_id = {$this->_id})";
342 $softCreditList = CRM_Contribute_BAO_ContributionSoft::getSoftContributionList($this->_contactId, $filter);
343 if (!empty($softCreditList)) {
344 $this->assign('softCredit', TRUE);
345 $this->assign('softCreditRows', $softCreditList);
346 }
347 }
6a488035
TO
348 }
349 else {
350 $this->_accessContribution = FALSE;
351 $this->assign('accessContribution', FALSE);
91ef9be0 352 $this->assign('softCredit', FALSE);
6a488035
TO
353 }
354
355 if ($this->_action & CRM_Core_Action::VIEW) {
356 $this->view();
357 }
8d8bd076 358 elseif ($this->_action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::DELETE
359 | CRM_Core_Action::RENEW)) {
360 self::setContext($this);
6a488035
TO
361 $this->edit();
362 }
363 else {
8d8bd076 364 self::setContext($this);
6a488035
TO
365 $this->browse();
366 }
367
368 return parent::run();
369 }
370
8d8bd076 371 public static function setContext(&$form, $contactId = NULL) {
372 $context = CRM_Utils_Request::retrieve('context', 'String', $form, FALSE, 'search' );
6a488035 373
8d8bd076 374 $qfKey = CRM_Utils_Request::retrieve('key', 'String', $form);
29571f63
AS
375
376 $searchContext = CRM_Utils_Request::retrieve('searchContext', 'String', $this);
377
6a488035
TO
378 //validate the qfKey
379 if (!CRM_Utils_Rule::qfKey($qfKey)) {
380 $qfKey = NULL;
381 }
382
383 if (!$contactId) {
8d8bd076 384 $contactId = $form->_contactId;
6a488035
TO
385 }
386
387 switch ($context) {
388 case 'dashboard':
8d8bd076 389 $url = CRM_Utils_System::url('civicrm/member', 'reset=1');
6a488035
TO
390 break;
391
392 case 'membership':
8d8bd076 393 $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&force=1&cid={$contactId}&selectedChild=member");
6a488035
TO
394 break;
395
396 case 'search':
397 $urlParams = 'force=1';
398 if ($qfKey) {
399 $urlParams .= "&qfKey=$qfKey";
400 }
8d8bd076 401 $form->assign('searchKey', $qfKey);
2a6da8d7 402
29571f63
AS
403 if ($searchContext) {
404 $url = CRM_Utils_System::url("civicrm/$searchContext/search", $urlParams);
405 }
406 else {
407 $url = CRM_Utils_System::url('civicrm/member/search', $urlParams);
408 }
6a488035
TO
409 break;
410
411 case 'home':
412 $url = CRM_Utils_System::url('civicrm/dashboard', 'reset=1');
413 break;
414
415 case 'activity':
416 $url = CRM_Utils_System::url('civicrm/contact/view',
417 "reset=1&force=1&cid={$contactId}&selectedChild=activity"
418 );
419 break;
420
421 case 'standalone':
422 $url = CRM_Utils_System::url('civicrm/dashboard', 'reset=1');
423 break;
424
425 case 'fulltext':
8d8bd076 426 $action = CRM_Utils_Request::retrieve('action', 'String', $form);
427 $keyName = '&qfKey';
6a488035
TO
428 $urlParams = 'force=1';
429 $urlString = 'civicrm/contact/search/custom';
430 if ($action == CRM_Core_Action::UPDATE) {
8d8bd076 431 if ($form->_contactId) {
ec6d9c07 432 $urlParams .= '&cid=' . $form->_contactId;
6a488035
TO
433 }
434 $keyName = '&key';
435 $urlParams .= '&context=fulltext&action=view';
436 $urlString = 'civicrm/contact/view/membership';
437 }
438 if ($qfKey) {
439 $urlParams .= "$keyName=$qfKey";
440 }
8d8bd076 441 $form->assign('searchKey', $qfKey);
6a488035
TO
442 $url = CRM_Utils_System::url($urlString, $urlParams);
443 break;
444
445 default:
446 $cid = NULL;
447 if ($contactId) {
448 $cid = '&cid=' . $contactId;
449 }
8d8bd076 450 $url = CRM_Utils_System::url('civicrm/member/search', 'force=1' . $cid);
6a488035
TO
451 break;
452 }
453
454 $session = CRM_Core_Session::singleton();
455 $session->pushUserContext($url);
456 }
457
458 /**
459 * Get action links
460 *
2a6da8d7
EM
461 * @param string $status
462 * @param null $isPaymentProcessor
463 * @param null $accessContribution
464 * @param bool $isCancelSupported
465 * @param bool $isUpdateBilling
466 *
6a488035
TO
467 * @return array (reference) of action links
468 * @static
469 */
470 static function &links($status = 'all',
8d8bd076 471 $isPaymentProcessor = NULL,
472 $accessContribution = NULL,
473 $isCancelSupported = FALSE,
474 $isUpdateBilling = FALSE
6a488035
TO
475 ) {
476 if (!CRM_Utils_Array::value('view', self::$_links)) {
477 self::$_links['view'] = array(
478 CRM_Core_Action::VIEW => array(
479 'name' => ts('View'),
480 'url' => 'civicrm/contact/view/membership',
481 'qs' => 'action=view&reset=1&cid=%%cid%%&id=%%id%%&context=membership&selectedChild=member',
482 'title' => ts('View Membership'),
483 ),
484 );
485 }
486
487 if (!CRM_Utils_Array::value('all', self::$_links)) {
488 $extraLinks = array(
489 CRM_Core_Action::UPDATE => array(
490 'name' => ts('Edit'),
491 'url' => 'civicrm/contact/view/membership',
492 'qs' => 'action=update&reset=1&cid=%%cid%%&id=%%id%%&context=membership&selectedChild=member',
493 'title' => ts('Edit Membership'),
494 ),
495 CRM_Core_Action::RENEW => array(
496 'name' => ts('Renew'),
497 'url' => 'civicrm/contact/view/membership',
498 'qs' => 'action=renew&reset=1&cid=%%cid%%&id=%%id%%&context=membership&selectedChild=member',
499 'title' => ts('Renew Membership'),
500 ),
501 CRM_Core_Action::FOLLOWUP => array(
502 'name' => ts('Renew-Credit Card'),
503 'url' => 'civicrm/contact/view/membership',
504 'qs' => 'action=renew&reset=1&cid=%%cid%%&id=%%id%%&context=membership&selectedChild=member&mode=live',
505 'title' => ts('Renew Membership Using Credit Card'),
506 ),
507 CRM_Core_Action::DELETE => array(
508 'name' => ts('Delete'),
509 'url' => 'civicrm/contact/view/membership',
510 'qs' => 'action=delete&reset=1&cid=%%cid%%&id=%%id%%&context=membership&selectedChild=member',
511 'title' => ts('Delete Membership'),
512 ),
513 );
514 if (!$isPaymentProcessor || !$accessContribution) {
515 //unset the renew with credit card when payment
516 //processor is not available or user is not permitted to create contributions
517 unset($extraLinks[CRM_Core_Action::FOLLOWUP]);
518 }
519 self::$_links['all'] = self::$_links['view'] + $extraLinks;
520 }
521
522
523 if ($isCancelSupported) {
524 $cancelMessage = ts('WARNING: If you cancel the recurring contribution associated with this membership, the membership will no longer be renewed automatically. However, the current membership status will not be affected.');
525 self::$_links['all'][CRM_Core_Action::DISABLE] = array(
526 'name' => ts('Cancel Auto-renewal'),
527 'url' => 'civicrm/contribute/unsubscribe',
528 'qs' => 'reset=1&cid=%%cid%%&mid=%%id%%&context=membership&selectedChild=member',
529 'title' => ts('Cancel Auto Renew Subscription'),
530 'extra' => 'onclick = "if (confirm(\'' . $cancelMessage . '\') ) { return true; else return false;}"',
531 );
532 }
533 elseif (isset(self::$_links['all'][CRM_Core_Action::DISABLE])) {
534 unset(self::$_links['all'][CRM_Core_Action::DISABLE]);
535 }
536
537 if ($isUpdateBilling) {
538 self::$_links['all'][CRM_Core_Action::MAP] = array(
539 'name' => ts('Change Billing Details'),
540 'url' => 'civicrm/contribute/updatebilling',
541 'qs' => 'reset=1&cid=%%cid%%&mid=%%id%%&context=membership&selectedChild=member',
542 'title' => ts('Change Billing Details'),
543 );
544 }
545 elseif (isset(self::$_links['all'][CRM_Core_Action::MAP])) {
546 unset(self::$_links['all'][CRM_Core_Action::MAP]);
547 }
548 return self::$_links[$status];
549 }
550
551 /**
552 * Function to define action links for membership types of related organization
553 *
554 * @return array self::$_membershipTypesLinks array of action links
555 * @access public
556 */
557 static function &membershipTypesLinks() {
558 if (!self::$_membershipTypesLinks) {
559 self::$_membershipTypesLinks = array(
560 CRM_Core_Action::VIEW => array(
561 'name' => ts('Members'),
562 'url' => 'civicrm/member/search/',
563 'qs' => 'reset=1&force=1&type=%%id%%',
564 'title' => ts('Search'),
565 ),
566 CRM_Core_Action::UPDATE => array(
567 'name' => ts('Edit'),
568 'url' => 'civicrm/admin/member/membershipType',
569 'qs' => 'action=update&id=%%id%%&reset=1',
570 'title' => ts('Edit Membership Type'),
571 ),
572 );
573 }
574 return self::$_membershipTypesLinks;
575 }
576
577 /**
578 * This function is used for the to show the associated
579 * contribution for the membership
580 * @form array $form (ref.) an assoc array of name/value pairs
581 * return null
582 * @access public
583 */
141d3170 584 public static function associatedContribution($contactId = NULL, $membershipId = NULL) {
8d8bd076 585 $controller = new CRM_Core_Controller_Simple(
586 'CRM_Contribute_Form_Search',
587 ts('Contributions'),
588 NULL,
589 FALSE, FALSE, TRUE
590 );
591 $controller->setEmbedded(TRUE);
592 $controller->reset();
593 $controller->set('force', 1);
594 $controller->set('cid', $contactId);
595 $controller->set('memberId', $membershipId);
596 $controller->set('context', 'contribution');
597 $controller->process();
598 $controller->run();
6a488035
TO
599 }
600
601 /**
602 * Get BAO Name
603 *
604 * @return string Classname of BAO.
605 */
606 function getBAOName() {
607 return 'CRM_Member_BAO_Membership';
608 }
609}
610