<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
// check for permissions
$session = CRM_Core_Session::singleton();
- if ($session->get('userID') != $this->_contactId &&
- !CRM_Contact_BAO_Contact_Permission::allow($this->_contactId, CRM_Core_Permission::EDIT)
- ) {
+ if (!CRM_Contact_BAO_Contact_Permission::allow($this->_contactId, CRM_Core_Permission::EDIT)) {
CRM_Core_Error::statusBounce(ts('You do not have the necessary permission to edit this contact.'));
}
}
if (array_key_exists('Address', $this->_editOptions)) {
- $this->addFormRule(array('CRM_Contact_Form_Edit_Address', 'formRule'));
+ $this->addFormRule(array('CRM_Contact_Form_Edit_Address', 'formRule'), $this);
}
if (array_key_exists('CommunicationPreferences', $this->_editOptions)) {