@@ -317,13 +317,13 @@ |
||
| 317 | 317 | VALUES (?, ?, ?, ?, ?, ?, ?)", |
| 318 | 318 | "sssssss", |
| 319 | 319 | [ |
| 320 | - $info['nick'], |
|
| 321 | - $info['name'], |
|
| 322 | - $info['contact_number'], |
|
| 323 | - $info['leader'], |
|
| 324 | - $info['link'], |
|
| 325 | - $info['members'], |
|
| 326 | - $info['tell'] |
|
| 320 | + $info['nick'], |
|
| 321 | + $info['name'], |
|
| 322 | + $info['contact_number'], |
|
| 323 | + $info['leader'], |
|
| 324 | + $info['link'], |
|
| 325 | + $info['members'], |
|
| 326 | + $info['tell'] |
|
| 327 | 327 | ], |
| 328 | 328 | false |
| 329 | 329 | ); |
@@ -608,41 +608,41 @@ |
||
| 608 | 608 | |
| 609 | 609 | function unsubscribe($nick=null, $email=null, $hash=null) { |
| 610 | 610 | |
| 611 | - if ( $nick == null || $email == null || $hash == null) { |
|
| 611 | + if ( $nick == null || $email == null || $hash == null) { |
|
| 612 | 612 | $this->load_view('contest/unsubscribe', [ |
| 613 | 613 | 'message' => 'Unable to process your request' |
| 614 | 614 | ]); |
| 615 | 615 | return; |
| 616 | - } |
|
| 617 | - |
|
| 618 | - global $SECRET_STRING; |
|
| 619 | - |
|
| 620 | - $verified = false; |
|
| 621 | - for ($i = 0; $i < 500; $i++) { |
|
| 622 | - $possible_hash = sha1($i . $nick . $email . $SECRET_STRING); |
|
| 623 | - if ($possible_hash == $hash) { |
|
| 624 | - $verified = true; |
|
| 625 | - break; |
|
| 626 | - } |
|
| 627 | - } |
|
| 628 | - |
|
| 629 | - if (!$verified) { |
|
| 630 | - $this->load_view('contest/unsubscribe', [ |
|
| 631 | - 'message' => 'Unable to process your request.' |
|
| 632 | - ]); |
|
| 633 | - return; |
|
| 634 | - } |
|
| 635 | - |
|
| 636 | - if ($this->auth_model->unsubscribe_user($nick, $email)) { |
|
| 637 | - $this->load_view('contest/unsubscribe', [ |
|
| 638 | - 'message' => 'You have been successfully unsubscribe from our mailing list.' |
|
| 639 | - ]); |
|
| 640 | - } |
|
| 641 | - else { |
|
| 642 | - $this->load_view('contest/unsubscribe', [ |
|
| 643 | - 'message' => 'Unable to process your request.' |
|
| 644 | - ]); |
|
| 645 | - } |
|
| 616 | + } |
|
| 617 | + |
|
| 618 | + global $SECRET_STRING; |
|
| 619 | + |
|
| 620 | + $verified = false; |
|
| 621 | + for ($i = 0; $i < 500; $i++) { |
|
| 622 | + $possible_hash = sha1($i . $nick . $email . $SECRET_STRING); |
|
| 623 | + if ($possible_hash == $hash) { |
|
| 624 | + $verified = true; |
|
| 625 | + break; |
|
| 626 | + } |
|
| 627 | + } |
|
| 628 | + |
|
| 629 | + if (!$verified) { |
|
| 630 | + $this->load_view('contest/unsubscribe', [ |
|
| 631 | + 'message' => 'Unable to process your request.' |
|
| 632 | + ]); |
|
| 633 | + return; |
|
| 634 | + } |
|
| 635 | + |
|
| 636 | + if ($this->auth_model->unsubscribe_user($nick, $email)) { |
|
| 637 | + $this->load_view('contest/unsubscribe', [ |
|
| 638 | + 'message' => 'You have been successfully unsubscribe from our mailing list.' |
|
| 639 | + ]); |
|
| 640 | + } |
|
| 641 | + else { |
|
| 642 | + $this->load_view('contest/unsubscribe', [ |
|
| 643 | + 'message' => 'Unable to process your request.' |
|
| 644 | + ]); |
|
| 645 | + } |
|
| 646 | 646 | |
| 647 | 647 | } |
| 648 | 648 | |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | $user_details = $this->model->is_registered_for_mun($user_nick); |
| 110 | 110 | if ($user_details && $user_details['payment_status'] != 'success') { |
| 111 | 111 | $redirect_url = $this->get_mun_payment_url($user_nick, $user_details['contact_number'], |
| 112 | - $user_details['team_size'], $user_details['needs_accomodation']); |
|
| 112 | + $user_details['team_size'], $user_details['needs_accomodation']); |
|
| 113 | 113 | $this->load_library('http_lib', 'http'); |
| 114 | 114 | $this->http->redirect($redirect_url); |
| 115 | 115 | } else { |