diff options
Diffstat (limited to 'core/Piwik.php')
-rw-r--r-- | core/Piwik.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/Piwik.php b/core/Piwik.php index cdcf3e196f..7151b420cc 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -179,6 +179,25 @@ class Piwik return $user['email'] ?? ''; } + + public static function getCurrentUserCreationData() + { + $user = APIUsersManager::getInstance()->getUser(Piwik::getCurrentUserLogin()); + return $user['date_registered'] ?? ''; + } + + /** + * Returns the current user's Last Seen. + * + * @return string + * @api + */ + public static function getCurrentUserLastSeen() + { + $user = APIUsersManager::getInstance()->getUser(Piwik::getCurrentUserLogin()); + return $user['last_seen'] ?? ''; + } + /** * Returns the email addresses configured as contact. If none is configured the mail addresses of all super users will be returned instead. * |