mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-28 23:05:54 +00:00
Minor changes to match coding style of original coder
This commit is contained in:
@@ -289,12 +289,14 @@ class LdapIdentities implements IIdentities
|
||||
@paraam string $mailPrefix
|
||||
@return array
|
||||
*/
|
||||
private function CleanupMailAddresses(array $entries, string $mailField, string $mailPrefix) {
|
||||
private function CleanupMailAddresses(array $entries, string $mailField, string $mailPrefix)
|
||||
{
|
||||
if (!empty($mailPrefix)) {
|
||||
for ($i = 0; $i < $entries["count"]; $i++) {
|
||||
// Remove addresses without the given prefix
|
||||
$entries[$i]["$mailField"] = array_filter($entries[$i]["$mailField"],
|
||||
function($prefixMail) {
|
||||
function($prefixMail)
|
||||
{
|
||||
// $mailPrefix can't be used here, because it's nailed to the CleanupMailAddresses function and can't be passed to the array_filter function afaik.
|
||||
// Ideas to avoid this are welcome.
|
||||
if (stripos($prefixMail, $this->config->mail_prefix) === 0) {
|
||||
@@ -321,7 +323,6 @@ class LdapIdentities implements IIdentities
|
||||
return $entries;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $entry
|
||||
* @param string $attribute
|
||||
|
||||
Reference in New Issue
Block a user