You are here

function uc_wishlist_get_wid in UC Wish List 6

Same name and namespace in other branches
  1. 8 uc_wishlist.module \uc_wishlist_get_wid()
  2. 7 uc_wishlist.module \uc_wishlist_get_wid()
8 calls to uc_wishlist_get_wid()
uc_product_update_wishlist_item in ./uc_wishlist.module
Update information about a specific item in current wish list.
uc_wishlist_add_item in ./uc_wishlist.module
Adds an item to a user's wish list.
uc_wishlist_add_items_to_cart in ./uc_wishlist.module
uc_wishlist_display in ./uc_wishlist.pages.inc
Display a wish list for viewing or altering.
uc_wishlist_get_contents in ./uc_wishlist.module
Get the items in a specified wish list.

... See full list

File

./uc_wishlist.module, line 473
Allows users to create public shopping/wish lists.

Code

function uc_wishlist_get_wid($uid = NULL) {

  // Find the wish list matching the authenticated or anonymous user ID.
  // TODO: Handle multiple wishlists?
  if (empty($uid)) {
    $uid = uc_wishlist_get_uid();
  }
  return db_result(db_query("SELECT wid FROM {uc_wishlists} WHERE uid = '%s'", $uid));
}