You are here

public function ContentLock::releaseAllUserLocks in Content locking (anti-concurrent editing) 8

Same name and namespace in other branches
  1. 8.2 src/ContentLock/ContentLock.php \Drupal\content_lock\ContentLock\ContentLock::releaseAllUserLocks()

Release all locks set by a user.

Parameters

int $uid: The user uid.

File

src/ContentLock/ContentLock.php, line 276

Class

ContentLock
Class ContentLock.

Namespace

Drupal\content_lock\ContentLock

Code

public function releaseAllUserLocks($uid) {
  $this->database
    ->delete('content_lock')
    ->condition('uid', $uid)
    ->execute();
}