You are here

public function UcWishlistManager::getWishlistIdByUser in UC Wish List 8

This function retrieves the id of a particular wish list by referring to the corresponding user id.

Parameters

$uid: refers to the id used for retrieving specific wish lists created by a specific user.

Return value

int The id of the desired wish list.

File

src/Database/UcWishlistManager.php, line 104

Class

UcWishlistManager
Defines an UcWishlistManager service.

Namespace

Drupal\uc_wishlist\Database

Code

public function getWishlistIdByUser($uid) {
  $this->connection
    ->query('SELECT wid FROM {uc_wishlists} WHERE uid = :uid;', [
    ':uid' => $uid,
  ])
    ->fetchField();
}