if (Post::has('account_deletion_confirmation')) {
$uid = $user->id();
$name = $user->fullName();
- $user->profile()->clear();
+ $profile = $user->profile();
+ if ($profile) {
+ $user->profile()->clear();
+ }
$user->clear(true);
$page->trigSuccess("L'utilisateur $name ($uid) a bien été supprimé.");
}
// where several copies of the site use the same DB, but not the same "dynamic configuration"
global $globals;
$globals->updateNbValid();
- $page->assign('vit', new ValidateIterator());
+ $page->assign('vit', Validate::iterate());
}
function handler_validate_answers(&$page, $action = 'list', $id = null)
$page->changeTpl('admin/jobs.tpl');
if (Env::has('search')) {
- $res = XDB::query("SELECT e.id, e.name, e.acronym
- FROM profile_job_enum AS e
- WHERE e.name LIKE CONCAT('% ', {?}, '%') OR e.acronym LIKE CONCAT('% ', {?}, '%')",
+ $res = XDB::query("SELECT id, name, acronym
+ FROM profile_job_enum
+ WHERE name LIKE CONCAT('%', {?}, '%') OR acronym LIKE CONCAT('%', {?}, '%')",
Env::t('job'), Env::t('job'));
if ($res->numRows() <= 20) {