public function afterDelete() { if (Yum::hasModule('profiles') && $this->profile !== null) { $this->profile->delete(); } Yum::log(Yum::t('User {username} (id: {id}) has been deleted', array('{username}' => $this->username, '{id}' => $this->id))); return parent::afterDelete(); }