public function AddSideMenu($CurrentUrl = '') {
      if (!$this->User)
         return;
      
      // Make sure to add the "Edit Profile" buttons.
      $this->AddModule('ProfileOptionsModule');
      
      // Show edit menu if in edit mode
      // Show profile pic & filter menu otherwise
      $SideMenu = new SideMenuModule($this);
      $this->EventArguments['SideMenu'] = &$SideMenu; // Doing this out here for backwards compatibility.
      if ($this->EditMode) {
         $this->AddModule('UserBoxModule');
         $this->BuildEditMenu($SideMenu, $CurrentUrl);
         $this->FireEvent('AfterAddSideMenu');
         $this->AddModule($SideMenu, 'Panel');
      } else {
         // Make sure the userphoto module gets added to the page
         $this->AddModule('UserPhotoModule');

         // And add the filter menu module
         $this->FireEvent('AfterAddSideMenu');
         $this->AddModule('ProfileFilterModule');
      }
   }