From 4514bea363aed903334e9034769910f5d0c9e39e Mon Sep 17 00:00:00 2001 From: Vincent Zanotti Date: Mon, 28 Jul 2008 00:08:39 +0200 Subject: [PATCH] Removes calls to get_user_forlife in Search and XnetEvents modules. Definitively remove get_user_forlife from user.func.inc.php. Signed-off-by: Vincent Zanotti --- include/user.func.inc.php | 8 -------- modules/search.php | 9 ++++----- modules/xnetevents/xnetevents.inc.php | 8 +++----- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/include/user.func.inc.php b/include/user.func.inc.php index 0030770..c3db0f7 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -271,14 +271,6 @@ function get_users_login_list($members, $strict = false, $get_forlife = false, $ } // }}} -// {{{ function get_user_forlife() - -function get_user_forlife($data, $callback = '_default_user_callback') -{ - return get_user_login($data, true, $callback); -} - -// }}} // {{{ function get_users_forlife_list() function get_users_forlife_list($members, $strict = false, $callback = '_default_user_callback') diff --git a/modules/search.php b/modules/search.php index a21500c..4bbbfc0 100644 --- a/modules/search.php +++ b/modules/search.php @@ -94,7 +94,7 @@ class SearchModule extends PLModule $list .= '|admin|adm|ax'; } if (preg_match('/^(' . $list . '):([-a-z]+(\.[-a-z]+(\.\d{2,4})?)?)$/', replace_accent($quick), $matches)) { - $forlife = $matches[2]; + $login = $matches[2]; switch($matches[1]) { case 'admin': case 'adm': $base = 'admin/user/'; @@ -110,10 +110,9 @@ class SearchModule extends PLModule break; } - require_once 'user.func.inc.php'; - $login = get_user_forlife($forlife, '_silent_user_callback'); - if ($login) { - pl_redirect($base . $login); + $user = User::getSilent($login); + if ($user) { + pl_redirect($base . $user->login()); } $_REQUEST['quick'] = $forlife; $_GET['quick'] = $forlife; diff --git a/modules/xnetevents/xnetevents.inc.php b/modules/xnetevents/xnetevents.inc.php index 4a69b7a..8e74de6 100644 --- a/modules/xnetevents/xnetevents.inc.php +++ b/modules/xnetevents/xnetevents.inc.php @@ -201,17 +201,15 @@ function get_event_participants(&$evt, $item_id, $tri, $limit = '') { // {{{ function subscribe_lists_event() function subscribe_lists_event($participate, $uid, $evt) { - require_once('user.func.inc.php'); global $globals; $page =& Platal::page(); $participant_list = $evt['participant_list']; $absent_list = $evt['absent_list']; - $email = get_user_forlife($uid, '_silent_user_callback'); - - if ($email) { - $email .= '@'.$globals->mail->domain; + $user = User::getSilent($uid); + if ($user) { + $email = $user->forlifeEmail(); } else { $res = XDB::query("SELECT email FROM groupex.membres -- 2.1.4