Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Piwik.php')
-rw-r--r--core/Piwik.php19
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.
*