/**
* Put a user-specific setting into the database.
+ * Can only take string value types since this may use
+ * the session which is less flexible to data types.
*/
public function putUser(User $user, string $key, string $value): bool
{
return $this->put($this->userKey($user->id, $key), $value);
}
+ /**
+ * Put a user-specific setting into the database for the current access user.
+ * Can only take string value types since this may use
+ * the session which is less flexible to data types.
+ */
+ public function putForCurrentUser(string $key, string $value)
+ {
+ return $this->putUser(user(), $key, $value);
+ }
+
/**
* Convert a setting key into a user-specific key.
*/