You are here

function getUid in Select registration roles 8

Parameters

$name:

Return value

mixed Get uid of the usr.

1 call to getUid()
select_registration_roles_form_submit in ./select_registration_roles.module
Implements hook_form_submit().

File

./select_registration_roles.module, line 112

Code

function getUid($name) {
  $select = db_select('users_field_data', 'u')
    ->fields('u', array())
    ->condition('u.name', $name)
    ->execute()
    ->fetchAll();
  return $select[0]->uid;
}