From 27159216ddfff72482f74c7bb704055d9b4d628e Mon Sep 17 00:00:00 2001 From: irgaabd Date: Fri, 20 Mar 2015 14:37:04 +0700 Subject: [PATCH] Fatal error: Call to undefined function get_my_posts() added a "get_my_posts()" function which return post to the viewer as an object --- system/admin/admin.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/system/admin/admin.php b/system/admin/admin.php index d428b38..53c7f74 100644 --- a/system/admin/admin.php +++ b/system/admin/admin.php @@ -404,6 +404,15 @@ function get_feed($feed_url, $credit) } } +// Get recent posts by user +function get_my_posts() +{ + if (isset($_SESSION[config("site.url")]['user'])) { + $posts = get_profile($_SESSION[config("site.url")]['user'], 1, 5); + return $posts; + } +} + // Get recent posts by user function get_recent_posts() {