diff options
Diffstat (limited to 'public/app/routes/user.php')
| -rw-r--r-- | public/app/routes/user.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/public/app/routes/user.php b/public/app/routes/user.php index 67032e6..622dc57 100644 --- a/public/app/routes/user.php +++ b/public/app/routes/user.php @@ -193,10 +193,17 @@ if (Auth::in_admin_group()) { Route::add('/admin/invite', function() { $teachers = Registry::use('database')->runQuery( "SELECT id, concat(last_name, ' ', first_name) as TeacherName - FROM user ORDER BY TeacherName", [] + FROM user ORDER BY TeacherName + WHERE otp_expiration < :now OR otp_expiration IS NULL", + [ ':now' => time() ] ); Render::view('templates/invite', ['teachers' => $teachers]); }); + + // POST AJAX: set petition protocol + Route::add('/admin/send/invitation', function() { + Office::send_invitation(); + }, 'post'); } |
