<?php
/***************************************************************************
- * Copyright (C) 2003-2009 Polytechnique.org *
+ * Copyright (C) 2003-2010 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function check_email($email, $message)
{
$res = XDB::query("SELECT state, description
- FROM emails_watch
+ FROM email_watch
WHERE state != 'safe' AND email = {?}", $email);
if ($res->numRows()) {
send_warning_mail($message);
function check_account()
{
- return S::v('watch_account');
+ if (S::user()) {
+ return S::user()->watch;
+ }
+ return false;
}
function check_redirect($red = null)
function kill_sessions()
{
- assert(S::has_perms());
+ assert(S::admin());
shell_exec('sudo -u root ' . dirname(dirname(__FILE__)) . '/bin/kill_sessions.sh');
}