function _favorites_user_storage_db in Favorites 7
Same name and namespace in other branches
- 7.2 favorites.module \_favorites_user_storage_db()
Helper function: Determine the current account's storage model.
Used to abstract storage (cookie vs. db). Currently only distinguishes between anonymous and registered users, but may be extended for future features.
Parameters
$account: Account in question. Optional; defaults to the current user.
Return value
bool TRUE, if the user's favorites may be stored in the database
2 calls to _favorites_user_storage_db()
- favorites_load_favorites in ./
favorites.module - Load the favorites for a particular user.
- _favorites_save_favorite in ./
favorites.module - Helper function: Store favorites for registered users.
File
- ./
favorites.module, line 370 - The favorites module allows users to bookmark any path within a site.
Code
function _favorites_user_storage_db($account = NULL) {
if (!isset($account)) {
global $user;
$account = $user;
}
return $account->uid > 0;
}