<div id='mm-role-desc-product-mgr' style="font-size:11px; margin-top:4px; display:none;">Employess with the <code>Product Manager</code> role will only be able to access the MemberMouse product settings and member management pages.</div> <div id='mm-role-desc-analyst' style="font-size:11px; margin-top:4px; display:none;">Employess with the <code>Analyst</code> role will only be able to access the MemberMouse reporting suite.</div> </td> </tr> <tr> <td>Display Name* </td> <td><input id="mm-display-name" type="text" class="medium-text" value='<?php echo $employee->getDisplayName(); ?> '/></td> </tr> <tr> <td>Email*</td> <td><input id="mm-email" type="text" class="medium-text" value='<?php echo $employee->getEmail(); ?> ' <?php echo $employee->isValid() ? "disabled" : ""; ?> /></td> </tr> <?php if (!$employee->isValid()) { ?> <tr> <td>Password*</td> <td><input id="mm-password" type="password" value='' /></td> </tr> <?php }
$actions .= MM_Utils::getDeleteIcon("Delete Push Notification", 'margin-left:5px;', $deleteActionUrl); if ($item->status == "1") { $actions .= '<a title="Send Test Notification" style="margin-left: 5px; cursor:pointer" onclick="mmjs.sendTestNotification(\'' . $item->id . '\');">' . MM_Utils::getIcon('flask', 'green', '1.3em', '2px') . '</a>'; } else { $actions .= '<a title="Activate this push notification in order to send a test" style="margin-left: 5px;">' . MM_Utils::getIcon('flask', 'grey', '1.3em', '2px') . '</a>'; } $description = ""; $actionValue = unserialize($item->action_value); if ($item->action_type == MM_Action::$MM_ACTION_SEND_EMAIL) { $description .= MM_Utils::getIcon('paper-plane-o', 'green', '1.3em', '2px', '', 'margin-right:4px;'); $description .= " Send an email to "; if ($actionValue["emailToId"] == "-1") { $description .= "the current member"; } else { $employee = new MM_Employee($actionValue["emailToId"]); $description .= "<span style='font-family:courier;'>" . $employee->getEmail() . "</span>"; } if (!empty($actionValue["emailCC"])) { $ccEmails = explode(",", $actionValue["emailCC"]); if (count($ccEmails) > 0) { if (count($ccEmails) == 1) { $description .= ", CC <span style='font-family:courier;'>" . $ccEmails[0] . "</span>"; } else { $description .= ", CC " . count($ccEmails) . " others"; } } } } else { if ($item->action_type == MM_Action::$MM_ACTION_CALL_SCRIPT) { $description .= MM_Utils::getIcon('file-code-o', 'turq', '1.3em', '2px', '', 'margin-right:4px;'); $description .= " Call script <span style='font-family:courier;'>" . MM_Utils::abbrevString($actionValue["scriptUrl"], 80) . "</span>";
if ($currentAccount->isValid()) { $currentAccount->commitData(); //the commit logic will clean up any invalid links if ($currentAccount->getUserId() instanceof WP_Error || $currentAccount->getUserId() <= 0) { $invalid_account_ids[] = $currentAccount->getId(); } } } } if (count($invalid_account_ids) > 0) { $successfully_deleted_accounts = array(); // attempt to delete all invalid accounts for ($i = 0; $i < count($invalid_account_ids); $i++) { $account = new MM_Employee($invalid_account_ids[$i]); if ($account->isValid()) { $userEmail = $account->getEmail(); $response = $account->delete(); // if account was deleted successfully, store it in $successfully_deleted_accounts if ($response) { $successfully_deleted_accounts[] = $userEmail; } } } // if one of more accounts were deleted successfully, display a message if (count($successfully_deleted_accounts) > 0) { $error = "The following invalid accounts were detected and have been deleted: <strong>" . implode(", ", $successfully_deleted_accounts) . "</strong>"; echo "<div class='updated'>"; echo "<p>" . $error . "</p>"; echo "</div>"; } }