public function process() { $this->verifyManifest(); $this->getUser(); $this->validatePassword(); $this->onBeforeUserActivate(); /* activate user */ $this->user->set('active', 1); $this->user->_fields['cachepwd'] = ''; $this->user->setDirty('cachepwd'); if (!$this->user->save()) { $this->modx->log(modX::LOG_LEVEL_ERROR, '[Register] Could not save activated user: '******'username')); return ''; } /* invoke OnUserActivate event */ $this->modx->invokeEvent('OnUserActivate', array('user' => &$this->user)); $this->addSessionContexts(); $this->redirectBack(); return ''; }