function checkForAction() { global $pagenow; if ($this->isTheAction() and !empty($_POST) and ($pagenow == 'profile.php' or !empty($_POST['user_id']))) { $userId = empty($_POST['user_id']) ? get_current_user_id() : $_POST['user_id']; if ($user = get_userdata($userId)) { $this->setUser($user); $old = array('email' => $user->user_email, RublonHelper::FIELD_USER_PROTECTION_TYPE => RublonHelper::userProtectionType($user)); $new = array('email' => $_POST['email'], RublonHelper::FIELD_USER_PROTECTION_TYPE => empty($_POST[RublonHelper::FIELD_USER_PROTECTION_TYPE]) ? null : $_POST[RublonHelper::FIELD_USER_PROTECTION_TYPE]); RublonConfirmations::handleConfirmation($this->getAction(), $_POST, $old, $new); } } }
function checkForAction() { if ($this->isTheAction() and !empty($_POST)) { RublonConfirmations::handleConfirmation($this->getAction(), $this->getInitialContext()); } }