You are here

function stripe_customer_get_uid in Stripe 7

Get a User ID associated with a Stripe Customer ID.

1 call to stripe_customer_get_uid()
_stripe_customer_update in stripe_customer/stripe_customer.module
Update a Stripe customer on Stripe's servers.

File

stripe_customer/stripe_customer.module, line 299
Provides integration with Stripe and Drupal Users as Customers.

Code

function stripe_customer_get_uid($customer_id) {
  $uid = db_query("SELECT uid FROM {stripe_customers} WHERE customer_id = :customer_id", array(
    ':customer_id' => $customer_id,
  ))
    ->fetchField();
  if ($uid <= 0) {
    return FALSE;
  }
  return $uid;
}