summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/User.php b/classes/User.php
index 370dad82f..b22e486f3 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -94,4 +94,18 @@ class User extends DB_DataObject
$merged = array_merge($blacklist, common_config('nickname', 'blacklist'));
return !in_array($nickname, $merged);
}
+
+ function getCurrentNotice() {
+ $notice = DB_DataObject::factory('notice');
+ $profile = $this->getProfile();
+ $notice->profile_id = $profile->id;
+ $notice->limit(1);
+ $notice->orderBy('created DESC');
+ if ($notice->find()) {
+ $notice->fetch();
+ return $notice;
+ }
+ return NULL;
+ }
+
}