]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Profile.php
Merge pull request #5794 from annando/ap1
[friendica.git] / src / Model / Profile.php
index 3a014517da9b158875c176c4654c0428e3686f95..cb2754cc80ce6a8ef218421ec7952ccb00327fed 100644 (file)
@@ -28,6 +28,19 @@ require_once 'include/dba.php';
 
 class Profile
 {
+       /**
+        * @brief Returns default profile for a given user id
+        *
+        * @param integer User ID
+        *
+        * @return array Profile data
+        */
+       public static function getByUID($uid)
+       {
+               $profile = DBA::selectFirst('profile', [], ['uid' => $uid, 'is-default' => true]);
+               return $profile;
+       }
+
        /**
         * @brief Returns a formatted location string from the given profile array
         *