Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webapollo_users status field #12

Closed
bradfordcondon opened this issue Oct 11, 2018 · 1 comment
Closed

webapollo_users status field #12

bradfordcondon opened this issue Oct 11, 2018 · 1 comment
Assignees
Milestone

Comments

@bradfordcondon
Copy link
Contributor

bradfordcondon commented Oct 11, 2018

it's used in two places to fetch all web apollo 1 and 2 records for a user respectively:

  $email = $values['mail'];
  $check_email_status1_exists = db_select('webapollo_users', 'w')
    ->fields('w', ['uid', 'name', 'pass', 'organisms'])
    ->condition('w.email', $email, '=')
    ->condition('w.status', 1, '=')
    ->orderby('w.created', 'desc')
    ->range(0, 1)
    ->execute()->fetchObject();

  $check_email_status2_exists = db_select('webapollo_users', 'w')
    ->fields('w', ['uid', 'name', 'pass', 'organisms'])
    ->condition('w.email', $email, '=')
    ->condition('w.status', 2, '=')
    ->orderby('w.created', 'desc')
    ->range(0, 1)
    ->execute()->fetchObject();

here's the description:

     'status' => [
        'type' => 'int',
        'not null' => TRUE,
        'default' => 2,
        'size' => 'tiny',
        'description' => 'Whether the user is active(1) or blocked(0).',
      ],

the default = 2 makes me think that its only the description thats wrong, but need to be careful in case its used as a user-status anywhere.

@bradfordcondon bradfordcondon added this to the 1.0 milestone Oct 15, 2018
@bradfordcondon
Copy link
Contributor Author

I updated the description to 'description' => 'Whether the user is active(1/2) or blocked(0). ALSO if this instance is an apollo 1 (1) or apollo 2 (2) instance.',

However splitting the schema resolves this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant