+
+ function streamModeOnly()
+ {
+ if (common_config('oldschool', 'enabled')) {
+ $osp = Old_school_prefs::getKV('user_id', $this->id);
+ if (!empty($osp)) {
+ return $osp->stream_mode_only;
+ }
+ }
+
+ return false;
+ }
+
+ function conversationTree()
+ {
+ if (common_config('oldschool', 'enabled')) {
+ $osp = Old_school_prefs::getKV('user_id', $this->id);
+ if (!empty($osp)) {
+ return $osp->conversation_tree;
+ }
+ }
+
+ return false;
+ }
+
+ function streamNicknames()
+ {
+ if (common_config('oldschool', 'enabled')) {
+ $osp = Old_school_prefs::getKV('user_id', $this->id);
+ if (!empty($osp)) {
+ return $osp->stream_nicknames;
+ }
+ }
+ return false;
+ }
+
+ function registrationActivity()
+ {
+ $profile = $this->getProfile();
+
+ $service = new ActivityObject();
+
+ $service->type = ActivityObject::SERVICE;
+ $service->title = common_config('site', 'name');
+ $service->link = common_root_url();
+ $service->id = $service->link;
+
+ $act = new Activity();
+
+ $act->actor = ActivityObject::fromProfile($profile);
+ $act->verb = ActivityVerb::JOIN;
+
+ $act->objects[] = $service;
+
+ $act->id = TagURI::mint('user:register:%d',
+ $this->id);
+
+ $act->time = strtotime($this->created);
+
+ $act->title = _("Register");
+
+ $act->content = sprintf(_('%1$s joined %2$s.'),
+ $profile->getBestName(),
+ $service->title);
+ return $act;
+ }