public void save() {
    if (!TapestryUtils.isValid(this)) {
      return;
    }

    User user = getUserForEditing();
    UserForm.updatePin(this, user, getCoreContext().getAuthorizationRealm());
    getCoreContext().saveUser(user);

    savePersonalAttendant(user);
    MailboxManager mailMgr = getMailboxManager();
    if (mailMgr.isEnabled()) {
      mailMgr.writePreferencesFile(user);
    }
  }
  @Override
  public void pageBeginRender(PageEvent event) {
    super.pageBeginRender(event);

    if (getAvailableTabNames() == null) {
      initAvailableTabs();
    }

    User user = getUserForEditing();
    if (user == null) {
      user = getUser();
      setUserForEditing(user);
    }

    UserForm.initializePin(getComponent("pin"), this, user);

    MailboxManager mailMgr = getMailboxManager();
    if (getMailboxPreferences() == null && mailMgr.isEnabled()) {
      setMailboxPreferences(new MailboxPreferences(user));
    }

    if (getImNotificationSettings() == null) {
      setImNotificationSettings(getUser().getSettings().getSetting("im_notification"));
    }

    PersonalAttendant personalAttendant = getPersonalAttendant();
    if (personalAttendant == null) {
      PersonalAttendant pa = mailMgr.loadPersonalAttendantForUser(user);
      setPersonalAttendant(pa);
    }

    if (getTab().equals(TAB_CONFERENCES)) {
      Block b =
          (Block)
              getComponent("userConferencesPanel")
                  .getComponent("conferencesPanel")
                  .getComponent("conferenceActions");
      setActionBlockForConferencesTab(b);
    }
  }