Fixed some basic tests.

This commit is contained in:
James Cole
2015-03-13 08:44:07 +01:00
parent 3f89057528
commit 3b11bd0593
7 changed files with 154 additions and 27 deletions

View File

@@ -45,12 +45,12 @@ class Preferences
if (is_null($pref)) {
$pref = new Preference;
$pref->name = $name;
$pref->user()->associate(Auth::user());
}
$pref->data = $value;
$pref->save();
if (!is_null(Auth::user()->id)) {
$pref->user()->associate(Auth::user());
$pref->save();
}
return $pref;