Commit ac55425b authored by RemyD's avatar RemyD

Add Group migration procedure

parent 9b7367d8
......@@ -148,6 +148,30 @@ function onShowEnd() {
unset($sqlr);
}
}
// Need to check all groups
$sql= "select id,guid,displayName,proxyAddresses,extensionAttribute1 from ".$_DB_GRP_TBL." where ParentGUID='".$guid."'";
$grps = $app->db->queryAllRecords($sql);
// action : 37. GUID, Param1:New, Param2:Old)
foreach ($grps as $grp) {
$email= $grp['proxyAddresses'];
$org = $grp['extensionAttribute1'];
if (strpos($email,".migration")) {
$newemail = str_replace(".migration", "", $email);
$act = new action($grp['guid'],$grp['id'],$grp['displayName'],$newemail,$email,'',37,$org);
$sqlu=$act->getSQL();
$app->db->query($sqlu);
unset($act);
unset($sqlu);
// remove old email
$oldemail= str_replace("SMTP","smtp", $email);
$act = new action($grp['guid'],$grp['id'],$grp['displayName'],$oldemail,'','',51,$org);
$sqlr=$act->getSQL();
$app->db->query($sqlr);
unset($act);
unset($sqlr);
}
}
} else {
// $app->error("Value:".$this->dataRecord['end_migration'],TRUE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment