/** * Check for an active/inactive status change * @return boolean|string */ public function checkActiveChange() { $this->activeStatusChanged = $this->object->isDirty('active'); $this->newActiveStatus = $this->object->get('active'); if ($this->activeStatusChanged) { $event = $this->newActiveStatus == true ? 'OnBeforeUserActivate' : 'OnBeforeUserDeactivate'; $OnBeforeUserActivate = $this->modx->invokeEvent($event, array('id' => $this->object->get('id'), 'user' => &$this->object, 'mode' => modSystemEvent::MODE_UPD)); $canChange = $this->processEventResponse($OnBeforeUserActivate); if (!empty($canChange)) { return $canChange; } } return true; }