/** * Check if specific user can add accounts * * @access public * @param User $user * @param Project $project * @return booelean */ function canAdd(Contact $user) { return can_add_mail_accounts($user); } // canAdd
<?php set_page_title(lang('mail accounts')); if (can_add_mail_accounts(logged_user())) { add_page_action(lang('add mail account'), get_url('mail', 'add_account'), 'ico-add'); } // if $genid = gen_id(); ?> <div id="<?php echo $genid ?>adminContainer" class="adminMailAccounts" style="height: 100%; background-color: white"> <div class="adminHeader"> <div class="adminTitle"><?php echo lang('mail accounts') ?></div> </div> <div class="adminSeparator"></div> <div class="adminMainBlock"><?php if(isset($all_accounts) && is_array($all_accounts) && count($all_accounts)) { ?> <table class="adminListing" style="min-width: 400px; margin-top: 10px;"> <tr> <th><?php echo lang('name') ?></th> <th><?php echo lang('email address') ?></th> <th><?php echo lang('created by') ?></th> <th><?php echo lang('incoming server') ?></th> <th><?php echo lang('outgoing server') ?></th> <th><?php echo lang('users') ?></th> <th><?php echo lang('options') ?></th> </tr> <?php $isAlt = true; foreach($all_accounts as $account) { $isAlt = !$isAlt;
/** * Check if specific user can add accounts * * @access public * @param User $user * @param Project $project * @return booelean */ function canAdd(User $user) { return can_add_mail_accounts($user); }