public function addRegistered(PlPage $page, Profile $profile) { XDB::execute('INSERT IGNORE INTO contacts (uid, contact) VALUES ({?}, {?})', S::i('uid'), $profile->id()); if (XDB::affectedRows() > 0) { S::user()->invalidWatchCache(); Platal::session()->updateNbNotifs(); $page->trigSuccess('Contact ajouté : ' . $profile->fullName(true)); } else { $page->trigWarning('Contact déjà dans la liste : ' . $profile->fullName(true)); } }