Attempt anonymous
Try anonymous function based on review suggestion.
This commit is contained in:
parent
88aeddab82
commit
9e81d3dc40
|
@ -155,9 +155,11 @@ class UserImport
|
||||||
unset($account['user']['account_expires_on']);
|
unset($account['user']['account_expires_on']);
|
||||||
unset($account['user']['expire_notification_sent']);
|
unset($account['user']['expire_notification_sent']);
|
||||||
|
|
||||||
foreach ($account['user'] as $k => &$v) {
|
$callback = function ($key, $value) use ($oldbaseurl, $oldaddr, $newbaseurl, $newaddr) {
|
||||||
$v = str_replace(array($oldbaseurl, $oldaddr), array($newbaseurl, $newaddr), $v);
|
return str_replace(array($oldbaseurl, $oldaddr), array($newbaseurl, $newaddr), $value);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
$v = array_map($account['user'], $callback);
|
||||||
|
|
||||||
// import user
|
// import user
|
||||||
$r = self::dbImportAssoc('user', $account['user']);
|
$r = self::dbImportAssoc('user', $account['user']);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user