You are here

function ABTWebTestCase::tagUser in Access By Term 7

1 call to ABTWebTestCase::tagUser()
ABTEnviromentTestCase::envTestUserData in ./abt.test

File

./abt.test, line 31

Class

ABTWebTestCase

Code

function tagUser(&$user, $field_name, $tids = array()) {
  for ($i = 0; $i < count($tids); $i++) {
    $user->{$field_name}['und'][]['tid'] = $tids[$i];
  }
  user_save($user);

  #$this->unauthorized_user->{$this->field_instances['user'][0]['field_name']}['und'][]['tid'] = $this->terms[0]->tid;
}