Skip to content
Snippets Groups Projects
Commit 3e02da6b authored by Andrew Rudenets's avatar Andrew Rudenets
Browse files

Fix semester switcher

parent 2b9e9275
Branches
Tags
No related merge requests found
...@@ -81,9 +81,11 @@ class Controller_Handler_Settings extends Controller_Handler ...@@ -81,9 +81,11 @@ class Controller_Handler_Settings extends Controller_Handler
} }
public function action_setSemesterID() { public function action_setSemesterID() {
$semester = $this->post['semesterID']; $this->post
if (is_int($semester) && $semester > 0) { ->rule('semesterID', 'not_empty')
$this->user->SemesterID = $semester; ->rule('semesterID', 'digit');
if ($this->post->check()) {
$this->user->SemesterID = (int) $this->post['semesterID'];
} }
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment