summary refs log tree commit diff
path: root/webclient/user/user-controller.js
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-19 09:37:10 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-19 09:37:10 +0200
commitd7a4f2ed7fec3640aea68c5280548470d6c53108 (patch)
tree55ca9bf19d9ca20f4d17821659947b4b38c3f2cc /webclient/user/user-controller.js
parentMade small avatar image center (diff)
downloadsynapse-d7a4f2ed7fec3640aea68c5280548470d6c53108.tar.xz
Fill user page with avatar, display name and matrix id
Diffstat (limited to 'webclient/user/user-controller.js')
-rw-r--r--webclient/user/user-controller.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/webclient/user/user-controller.js b/webclient/user/user-controller.js
index 4b7aa62d42..620230561c 100644
--- a/webclient/user/user-controller.js
+++ b/webclient/user/user-controller.js
@@ -17,9 +17,22 @@ limitations under the License.
 'use strict';
 
 angular.module('UserController', ['matrixService'])
-.controller('UserController', ['$scope', '$routeParams',
-                              function($scope, $routeParams) {                 
+.controller('UserController', ['$scope', '$routeParams', 'matrixService',
+                              function($scope, $routeParams, matrixService) {                 
     $scope.user = {
-        id: $routeParams.user_matrix_id
+        id: $routeParams.user_matrix_id,
+        displayname: "",
+        avatar_url: undefined
     };
+    
+    matrixService.getDisplayName($scope.user.id).then(
+        function(response) {
+            $scope.user.displayname = response.data.displayname;
+        }
+    ); 
+    matrixService.getProfilePictureUrl($scope.user.id).then(
+        function(response) {
+            $scope.user.avatar_url = response.data.avatar_url;
+        }
+    );
 }]);
\ No newline at end of file