You are here

public function MigrateExtrasUserFlagHandler::complete in Migrate Extras 7.2

File

./flag.inc, line 153
Flag module integration

Class

MigrateExtrasUserFlagHandler

Code

public function complete($user, stdClass $row) {
  if (!module_exists('flag')) {
    return;
  }
  $flags = flag_get_flags('user', 'user');
  $fields = array();
  foreach ($flags as $flag_name => $flag) {
    if (!empty($user->{$flag_name})) {
      flag('flag', $flag_name, $user->uid);
    }
  }
}