Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ if ($domains_processed == 1) { //if the default groups do not exist add them $group = new groups; $group->defaults(); //find rows that have a null group_uuid and set the correct group_uuid $sql = "select * from v_user_groups "; $sql .= "where group_uuid is null; "; $database = new database; $result = $database->select($sql, null, 'all'); if (is_array($result)) { foreach($result as $row) { if (strlen($row['group_name']) > 0) { //get the group_uuid $sql = "select group_uuid from v_groups "; $sql .= "where group_name = :group_name "; $parameters['group_name'] = $row['group_name']; $database = new database; $group_uuid = $database->select($sql, null, 'column'); unset($sql, $parameters); //set the group_uuid $sql = "update v_user_groups set "; $sql .= "group_uuid = :group_uuid "; $sql .= "where user_group_uuid = :user_group_uuid; "; $parameters['group_uuid'] = $group_uuid; $parameters['user_group_uuid'] = $row['user_group_uuid']; $database = new database; $database->execute($sql, $parameters); unset($sql, $parameters); } } unset ($result); } } ?>