@@ -64,21 +64,21 @@ discard block |
||
| 64 | 64 | case 'accept': |
| 65 | 65 | if (canAcceptSwap($swapId) || $verify == verificationCodeForSwap($swapId)) { |
| 66 | 66 | switch (acceptSwap($swapId)) { |
| 67 | - case '1': |
|
| 68 | - $message = 'Swap Successful'; |
|
| 69 | - break; |
|
| 70 | - case '2': |
|
| 71 | - $message = 'Swap already accepted.'; |
|
| 72 | - break; |
|
| 73 | - case '3': |
|
| 74 | - $message = 'Swap already declined.'; |
|
| 75 | - break; |
|
| 76 | - case '4': |
|
| 77 | - $message = 'Swap already reverted.'; |
|
| 78 | - break; |
|
| 79 | - default: |
|
| 80 | - $err = 'Technical issue - please inform system administrator'; |
|
| 81 | - break; |
|
| 67 | + case '1': |
|
| 68 | + $message = 'Swap Successful'; |
|
| 69 | + break; |
|
| 70 | + case '2': |
|
| 71 | + $message = 'Swap already accepted.'; |
|
| 72 | + break; |
|
| 73 | + case '3': |
|
| 74 | + $message = 'Swap already declined.'; |
|
| 75 | + break; |
|
| 76 | + case '4': |
|
| 77 | + $message = 'Swap already reverted.'; |
|
| 78 | + break; |
|
| 79 | + default: |
|
| 80 | + $err = 'Technical issue - please inform system administrator'; |
|
| 81 | + break; |
|
| 82 | 82 | } |
| 83 | 83 | } else { |
| 84 | 84 | $err = 'Swap Already Actioned or Verification Code Invalid'; |
@@ -87,15 +87,15 @@ discard block |
||
| 87 | 87 | case 'decline': |
| 88 | 88 | if (canDeclineSwap($swapId) || $verify == verificationCodeForSwap($swapId)) { |
| 89 | 89 | switch (declineSwap($swapId)) { |
| 90 | - case '1': |
|
| 91 | - $message = 'Swap declined'; |
|
| 92 | - break; |
|
| 93 | - case '2': |
|
| 94 | - $message = 'Swap already declined.'; |
|
| 95 | - break; |
|
| 96 | - default: |
|
| 97 | - $err = 'Technical issue - please inform system administrator'; |
|
| 98 | - break; |
|
| 90 | + case '1': |
|
| 91 | + $message = 'Swap declined'; |
|
| 92 | + break; |
|
| 93 | + case '2': |
|
| 94 | + $message = 'Swap already declined.'; |
|
| 95 | + break; |
|
| 96 | + default: |
|
| 97 | + $err = 'Technical issue - please inform system administrator'; |
|
| 98 | + break; |
|
| 99 | 99 | } |
| 100 | 100 | } else { |
| 101 | 101 | $err = 'Swap Already Actioned or Verification Code Invalid'; |
@@ -28,25 +28,25 @@ |
||
| 28 | 28 | $id = filter_var($id, FILTER_SANITIZE_NUMBER_INT); |
| 29 | 29 | |
| 30 | 30 | switch ($_POST['action']) { |
| 31 | - case 'approve': |
|
| 32 | - $userId = approvePendingUser($id); |
|
| 33 | - mailNewUser($userId); |
|
| 34 | - header('Location: addUser.php?action=edit&user='.$userId); |
|
| 35 | - break; |
|
| 36 | - case 'merge': |
|
| 37 | - $existingUserId = $_POST['existingUser']; |
|
| 38 | - $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
|
| 39 | - mergePendingUserWithUserId($id, $existingUserId); |
|
| 40 | - mailNewUser($existingUserId); |
|
| 41 | - header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
| 42 | - break; |
|
| 43 | - case 'decline': |
|
| 44 | - declinePendingUser($id); |
|
| 45 | - break; |
|
| 46 | - |
|
| 47 | - default: |
|
| 48 | - // code... |
|
| 49 | - break; |
|
| 31 | + case 'approve': |
|
| 32 | + $userId = approvePendingUser($id); |
|
| 33 | + mailNewUser($userId); |
|
| 34 | + header('Location: addUser.php?action=edit&user='.$userId); |
|
| 35 | + break; |
|
| 36 | + case 'merge': |
|
| 37 | + $existingUserId = $_POST['existingUser']; |
|
| 38 | + $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
|
| 39 | + mergePendingUserWithUserId($id, $existingUserId); |
|
| 40 | + mailNewUser($existingUserId); |
|
| 41 | + header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
| 42 | + break; |
|
| 43 | + case 'decline': |
|
| 44 | + declinePendingUser($id); |
|
| 45 | + break; |
|
| 46 | + |
|
| 47 | + default: |
|
| 48 | + // code... |
|
| 49 | + break; |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
@@ -37,22 +37,22 @@ |
||
| 37 | 37 | $platform = strtolower($_POST['platform']); |
| 38 | 38 | |
| 39 | 39 | switch ($_POST['action']) { |
| 40 | - case 'link': |
|
| 41 | - switch ($platform) { |
|
| 40 | + case 'link': |
|
| 41 | + switch ($platform) { |
|
| 42 | 42 | case 'facebook': |
| 43 | 43 | $_SESSION['fb-callback-url'] = 'fb-link.php'; |
| 44 | 44 | header('Location: fb-login.php'); |
| 45 | 45 | exit; |
| 46 | - } |
|
| 47 | - break; |
|
| 48 | - case 'unlink': |
|
| 49 | - removeSocialAuthFromUserWithId($id, $platform); |
|
| 50 | - createNotificationForUser($id, ucfirst($platform).' account unlinked', 'You have successfully unlinked your Facebook account. Login via Facebook is now disabled for your account. Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php'); |
|
| 51 | - break; |
|
| 52 | - |
|
| 53 | - default: |
|
| 54 | - // code... |
|
| 46 | + } |
|
| 55 | 47 | break; |
| 48 | + case 'unlink': |
|
| 49 | + removeSocialAuthFromUserWithId($id, $platform); |
|
| 50 | + createNotificationForUser($id, ucfirst($platform).' account unlinked', 'You have successfully unlinked your Facebook account. Login via Facebook is now disabled for your account. Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php'); |
|
| 51 | + break; |
|
| 52 | + |
|
| 53 | + default: |
|
| 54 | + // code... |
|
| 55 | + break; |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |