start using stream mode prefs instead of separate parameter

This commit is contained in:
Evan Prodromou
2011-09-23 17:50:38 -04:00
parent 66c97a1a1e
commit 02a30cf47c
5 changed files with 86 additions and 13 deletions

View File

@@ -1145,4 +1145,14 @@ class User extends Managed_DataObject
// TRANS: Subject for password recovery e-mail.
mail_to_user($user, _('Password recovery requested'), $body, $headers, $confirm->address);
}
function showStreamMode()
{
$smp = Stream_mode_prefs::staticGet('user_id', $this->id);
if (!empty($smp)) {
return $smp->show_stream_mode;
} else {
return false;
}
}
}