function _photos_access_user in Album Photos 7.3
Same name and namespace in other branches
- 8.4 photos_access/photos_access.module \_photos_access_user()
2 calls to _photos_access_user()
- _photos_access_usersave in photos_access/
photos_access.module - Save users to access album list.
- _photos_access_user_validate in photos_access/
photos_access.module - Validate user access to node.
File
- photos_access/
photos_access.module, line 728
Code
function _photos_access_user($u) {
if (isset($u['name'])) {
$ac = db_query("SELECT uid, name FROM {users} WHERE name = :name", array(
':name' => $u['name'],
))
->fetchObject();
}
elseif (isset($u['uid'])) {
$ac = db_query('SELECT uid, name FROM {users} WHERE uid = :uid', array(
':uid' => $u['uid'],
))
->fetchObject();
}
if (isset($ac->uid)) {
return $ac;
}
}