Commit 35e58240 authored by Nigel McNie's avatar Nigel McNie
Browse files

Make the default notification plugin for all notifications types 'email'. This...

Make the default notification plugin for all notifications types 'email'. This should encourage more use of the system by users.
parent 8c3657a9
......@@ -279,7 +279,7 @@ class User {
*/
public function get_activity_preference($key) {
$activityprefs = $this->get('activityprefs');
return isset($activityprefs[$key]) ? $activityprefs[$key] : null;
return isset($activityprefs[$key]) ? $activityprefs[$key] : 'email';
}
/** @todo document this method */
......
......@@ -144,9 +144,10 @@ function activity_set_defaults($user_id) {
$haveemail = in_array('email', array_map(create_function('$a', 'return $a->name;'),
plugins_installed('notification')));
foreach ($activitytypes as $type) {
if ($type->name == 'institutionmessage' && $haveemail) {
if ($haveemail) {
$method = 'email';
} else {
}
else {
$method = 'internal';
}
insert_record('usr_activity_preference', (object)array(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment