From 83040cf5d124f2437ad698422638fb433c217f06 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Sun, 4 Nov 2012 23:49:58 +0100 Subject: [PATCH] Add hook for pre-fetching the profile. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/user.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/classes/user.php b/classes/user.php index b8cca26..4626b85 100644 --- a/classes/user.php +++ b/classes/user.php @@ -369,6 +369,12 @@ class User extends PlUser return $this->_profile; } + public function setPrefetchedProfile(Profile $profile) + { + $this->_profile_fetched = true; + $this->_profile = $profile; + } + /** Return true if the user has an associated profile. */ public function hasProfile() -- 2.1.4