You are here

function mailhandler_mailbox_load_all in Mailhandler 6.2

Same name and namespace in other branches
  1. 7.2 mailhandler.module \mailhandler_mailbox_load_all()

Load all mailboxes.

Parameters

$show_disabled: If TRUE, will return disabled mailboxes.

Return value

An array of mailbox objects.

1 call to mailhandler_mailbox_load_all()
MailhandlerFetcher::sourceForm in plugins/feeds/plugins/MailhandlerFetcher.class.php
Source form.

File

./mailhandler.module, line 191
Retrieves email for posting as nodes and comments.

Code

function mailhandler_mailbox_load_all($show_disabled = TRUE) {
  ctools_include('export');
  $mailboxes = ctools_export_crud_load_all('mailhandler_mailbox');
  foreach ($mailboxes as $mail => $mailbox) {
    if (isset($mailbox->disabled) && $mailbox->disabled && !$show_disabled) {
      unset($mailboxes[$mail]);
    }
  }
  return $mailboxes;
}