Disables a single plugin in the system.
@param string $id Plugin code/namespace
@param bool $isUser Set to true if disabled by the user
@return bool
326969
public function disablePlugin($id, $isUser = false)
    {
        $code = $this->getIdentifier($id);
        if (array_key_exists($code, $this->disabledPlugins)) {
            return false;
        }

        $this->disabledPlugins[$code] = $isUser;
        $this->writeDisabled();

        if ($pluginObj = $this->findByIdentifier($code)) {
            $pluginObj->disabled = true;
        }

        return true;
    }
983731
public function deleteRow($id)
    {
        unset($this->rows[$id]);

        if (in_array($id, $this->specialRows['header'])) {
            unset($this->specialRows['header'][array_search($id, $this->specialRows['header'])]);
        }

        if (in_array($id, $this->specialRows['footer'])) {
            unset($this->specialRows['footer'][array_search($id, $this->specialRows['footer'])]);
        }

        if ($this->activeRow == $id) {
            end($this->rows);
            $this->activeRow = key($this->rows);
        }

        return $this;
    }
543810
public static function delete($id, $options = [])
    {
        $url = static::classUrl() . '/' . $id;
        return static::_directRequest('delete', $url, null, $options);
    }
687343
protected function isAllowed($what, $user = null, $contenttype = null, $contentid = null)
    {
        /** @var Token $sessionAuth */
        if ($user === null && $sessionAuth = $this->session()->get('authentication')) {
            $user = $sessionAuth->getUser()->toArray();
        }

        return $this->app['permissions']->isAllowed($what, $user, $contenttype, $contentid);
    }
916899
public function byId($id)
    {
        if ($user = $this->sentinel->getUserRepository()->findById($id)) {
            $this->sentinel->setUser($user);

            return true;
        }

        return false;
    }
802944
public function deactivate($id_user){
    $update = [
      $this->class_cfg['arch']['users']['active'] => 0,
      $this->class_cfg['arch']['users']['email'] => null,
    ];
    if ( !empty($this->class_cfg['arch']['users']['login']) ){
      $update[$this->class_cfg['arch']['users']['login']] = null;
    }

    return $this->db->update($this->class_cfg['tables']['users'], $update, [
      $this->class_cfg['arch']['users']['id'] => $id_user
    ]);
	}
414901
public function switchUser($id, array $params = [])
    {
        if ($id instanceOf UserInterface) {
            $id = $id->getId();
        }

        $oldSession = serialize($_SESSION);

        $session = $this->getSessionContainer();
        if ($session->isSwitchedUser) {
            return false;
        }

        $session->session      = $oldSession;
        $session->isSwitchedUser = true;
        $session->originalUser = $this->exchangeAuthUser($id);
        $session->params       = $params;
        $session->ref          = isset($params['ref']) ? $params['ref'] : $this->getController()->getRequest()->getRequestUri();

        return true;
    }
907016
public function removeById($id)
    {
        if (isset($this->ids[$id])) {
            foreach ($this->ids[$id] as $alias) {
                unset($this->aliases[$alias]);
            }
            unset($this->ids[$id]);
        }

        return $this;
    }
558326
public function remove($id)
    {
        $user = User::findOrNew($id);

        $user->delete();

        Alert::info(__('User was removed'));

        return redirect()->route('platform.systems.users');
    }
962429
public function destroy($id)
    {
     	$user_setting = User_setting::findOrfail($id);
     	$user_setting->delete();
        return URL::to('user_setting');
    }
156407
public static function deleted($id = null, array $options = array())
	{
		//Make sure we are not filtering out soft deleted items
		$deleted_column = static::soft_delete_property('deleted_field', static::$_default_field_name);
		$options['where'][] = array($deleted_column, 'IS NOT', null);

		static::disable_filter();
		$result = parent::find($id, $options);
		static::enable_filter();

		return $result;
	}
718220
public function disable($module_id)
    {
        try {
            $result = $this->canDisable($module_id);
        } catch (Exception $ex) {
            $result = $ex->getMessage();
        }

        $this->hook->attach("module.disable.before|$module_id", $result, $this);

        if ($result !== true) {
            return $result;
        }

        if ($this->module->isInstalled($module_id)) {
            $this->module->update($module_id, array('status' => false));
        } else {
            $this->module->add(array('status' => false, 'module_id' => $module_id));
        }

        $this->setOverrideConfig();

        $this->hook->attach("module.disable.after|$module_id", $result, $this);
        return $result;
    }
978086
public function deleteRelease(string $id): bool
    {
        $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/:id',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_DELETE);

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
720683
public function deleteAction($id)
    {
        $user = $this->getDoctrine()->getRepository('FOMUserBundle:User')->find($id);

        if ($user === null) {
            throw new NotFoundHttpException('The user does not exist');
        }
        if ($user->getId() === 1) {
            throw new NotFoundHttpException('The root user can not be deleted');
        }

        // ACL access check
        $this->denyAccessUnlessGranted('DELETE', $user);

        $aclProvider = $this->get('security.acl.provider');
        $oid         = ObjectIdentity::fromDomainObject($user);
        $aclProvider->deleteAcl($oid);

        $this->addProfileForm($user);

        $em = $this->getDoctrine()->getManager();
        $em->getConnection()->beginTransaction();

        try {
            $aclProvider = $this->get('security.acl.provider');
            $oid         = ObjectIdentity::fromDomainObject($user);
            $aclProvider->deleteAcl($oid);

            $em->remove($user);
            if ($user->getProfile()) {
                $em->remove($user->getProfile());
            }
            $em->flush();
            $em->getConnection()->commit();

            $this->get('session')->getFlashBag()->set('success', 'The user has been deleted.');
        } catch (\Exception $e) {
            $em->getConnection()->rollback();
            $this->get('session')->getFlashBag()->set('error', "The user couldn't be deleted.");
        }

        return new Response();
    }
824883
public function unregisterFileSystem($id)
    {
        $adapters = $this->getOption(self::OPTION_ADAPTERS);
        if (isset($adapters[$id])) {
            unset($adapters[$id]);
            if (isset($this->filesystems[$id])) {
                unset($this->filesystems[$id]);
            }
            $this->setOption(self::OPTION_ADAPTERS, $adapters);
            return true;
        } else {
            return false;
        }
    }
281898
function removeThis( $id = false )
    {
        $db = eZDB::instance();
        $db->begin();
        foreach ( $this->attribute( 'limitations' ) as $limitation )
        {
            $limitation->removeThis();
        }
        $db->query( "DELETE FROM ezpolicy
                     WHERE id='" . $db->escapeString( $this->attribute( 'id' ) ) . "'" );
        $db->commit();
    }
539172
public function unlock(string $id) : LockableInterface
    {
        if (isset($this->locks[$id]) === true) {
            unset($this->locks[$id]);
        }
        return $this;
    }