User object didn't have getNickname() function

We're just jumping on to the Profile->getNickname() function.
This commit is contained in:
Mikael Nordfeldth 2014-05-06 16:08:36 +02:00
parent 869ca2d20b
commit 8b12e41351
3 changed files with 7 additions and 1 deletions

View File

@ -137,6 +137,11 @@ class User extends Managed_DataObject
return $this->uri;
}
public function getNickname()
{
return $this->getProfile()->getNickname();
}
function isSubscribed(Profile $other)
{
return $this->getProfile()->isSubscribed($other);

View File

@ -4309,6 +4309,7 @@ class DB_DataObject extends DB_DataObject_Overload
$case[strtolower($k)] = $k;
}
if ((substr(phpversion(),0,1) == 5) && isset($case[strtolower($element)])) {
file_put_contents('/tmp/backtrace', var_export(debug_backtrace(),true));
trigger_error("PHP5 set/get calls should match the case of the variable",E_USER_WARNING);
$element = strtolower($element);
}

View File

@ -89,7 +89,7 @@ class UsersalmonAction extends SalmonAction
// In reply to a notice either from or mentioning this user.
} else if (!empty($context->attention) &&
(array_key_exists($this->user->uri, $context->attention) ||
array_key_exists($common_profile_url($this->user->nickname),
array_key_exists($common_profile_url($this->user->getNickname()),
$context->attention)))
{
// To the attention of this user.