You are here

function _email_verify_batch_display_get_current_uid in Email Verify 8.2

Same name and namespace in other branches
  1. 7.2 email_verify.check.inc \_email_verify_batch_display_get_current_uid()

Retrieves the user ID of the user to start the verification process with.

Parameters

int $user_offset: The number of users to skip before beginning verification.

bool $disabled_users: Indicates whether to include disabled users or not. A value of TRUE (or 1) includes them, where a value of FALSE (or 0) does not.

Return value

int The user ID before the one to start the verification with. The verification process starts with the uid after this one, so that uid 0 is not verified.

1 call to _email_verify_batch_display_get_current_uid()
email_verify_user_check_form_submit in ./email_verify.check.inc
Submit handler for the user check form.

File

./email_verify.check.inc, line 210
User email check menu callback file for email_verify module.

Code

function _email_verify_batch_display_get_current_uid($user_offset, $disabled_users) {
  $query = 'SELECT uid FROM users';

  // Check for whether to include blocked users.
  if (empty($disabled_users)) {
    $query .= ' WHERE status = 1';
  }
  $query .= ' ORDER BY uid ASC LIMIT 1 OFFSET ' . $user_offset;
  return db_query($query)
    ->fetchField();
}