We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit f9a91a28 authored by Evan Prodromou's avatar Evan Prodromou

Utility Profile::current() to get current user's profile

parent 70faf760
......@@ -1304,4 +1304,15 @@ class Profile extends Memcached_DataObject
return true;
static function current()
$user = common_current_user();
if (empty($user)) {
$profile = null;
} else {
$profile = $user->getProfile();
return $profile;
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