diff --git a/mailbox.php b/mailbox.php index b8ec9b6..35aa5d5 100644 --- a/mailbox.php +++ b/mailbox.php @@ -1,64 +1,64 @@ . /* * This is the mailbox edit page */ // load framework require 'load.php'; // wanted domain and mailbox username list( $domain_name, $mailbox_username ) = url_parts( 2 ); // retrieve domain -$mailbox = ( new mailboxFullAPI ) +$mailbox = ( new MailboxFullAPI() ) ->select( [ 'domain.domain_ID', 'domain.domain_name', 'domain.domain_active', 'mailbox_username', ] ) ->whereStr( 'domain_name', $domain_name ) ->whereStr( 'mailbox_username', $mailbox_username ) ->whereDomainIsEditable() ->queryRow(); // 404? $mailbox or PageNotFound::spawn(); $password = null; if( is_action( 'mailbox-password-reset' ) ) { $password = $mailbox->updateMailboxPassword(); } // spawn header Header::spawn( [ 'title' => sprintf( __( "Mailbox: %s" ), "" . esc_html( $mailbox->getMailboxAddress() ) . "" ), ] ); // spawn the page content template( 'mailbox', [ 'mailbox' => $mailbox, 'password' => $password, ] ); // spawn the footer Footer::spawn();