Commit ee0b6ab2 authored by xjm's avatar xjm

Issue #2886365 by kiamlaluno: Comments for the UserData::get() code are...

Issue #2886365 by kiamlaluno: Comments for the  UserData::get() code are unclear and wrongly use "was" instead of "were"
parent 62397e8e
......@@ -40,7 +40,7 @@ public function get($module, $uid = NULL, $name = NULL) {
$query->condition('name', $name);
}
$result = $query->execute();
// If $module, $uid, and $name was passed, return the value.
// If $module, $uid, and $name were passed, return the value.
if (isset($name) && isset($uid)) {
$result = $result->fetchAllAssoc('uid');
if (isset($result[$uid])) {
......@@ -48,7 +48,7 @@ public function get($module, $uid = NULL, $name = NULL) {
}
return NULL;
}
// If $module and $uid was passed, return the name/value pairs.
// If $module and $uid were passed, return data keyed by name.
elseif (isset($uid)) {
$return = [];
foreach ($result as $record) {
......@@ -56,7 +56,7 @@ public function get($module, $uid = NULL, $name = NULL) {
}
return $return;
}
// If $module and $name was passed, return the uid/value pairs.
// If $module and $name were passed, return data keyed by uid.
elseif (isset($name)) {
$return = [];
foreach ($result as $record) {
......
Markdown is supported
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