Example usage for com.liferay.portal.kernel.model User getMale

List of usage examples for com.liferay.portal.kernel.model User getMale

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.model User getMale.

Prototype

public boolean getMale() throws com.liferay.portal.kernel.exception.PortalException;

Source Link

Document

Returns true if the user is male.

Usage

From source file:it.sysdata.base.service.impl.UserHelperLocalServiceImpl.java

License:Open Source License

public User updateUserInfo(String emailAddress, String password, String firstName, String lastName,
        ServiceContext serviceContext) throws PortalException, SystemException {

    User user = UserLocalServiceUtil.getUserByEmailAddress(serviceContext.getCompanyId(), emailAddress);

    long userId = user.getUserId();
    String oldPassword = password;
    String newPassword1 = password;
    String newPassword2 = password;
    boolean passwordReset = false;

    String reminderQueryQuestion = null;
    String reminderQueryAnswer = null;
    String screenName = user.getScreenName();

    long facebookId = user.getFacebookId();
    String openId = user.getOpenId();
    String languageId = user.getLanguageId();
    String timeZoneId = user.getTimeZoneId();
    String greeting = user.getGreeting();
    String comments = null;/*from   ww  w.  ja v  a  2 s.com*/
    String middleName = user.getMiddleName();

    int prefixId = 0;
    int suffixId = 0;
    boolean male = user.getMale();
    int birthdayMonth = 0;
    int birthdayDay = 0;
    int birthdayYear = 0;

    String smsSn = null;
    String aimSn = null;
    String facebookSn = null;
    String icqSn = null;
    String jabberSn = null;
    String msnSn = null;
    String mySpaceSn = null;
    String skypeSn = null;
    String twitterSn = null;
    String ymSn = null;
    String jobTitle = user.getJobTitle();

    long[] groupIds = user.getGroupIds();
    long[] organizationIds = user.getOrganizationIds();
    long[] roleIds = user.getRoleIds();
    List<UserGroupRole> userGroupRoles = null;
    long[] userGroupIds = user.getUserGroupIds();

    return UserLocalServiceUtil.updateUser(userId, oldPassword, newPassword1, newPassword2, passwordReset,
            reminderQueryQuestion, reminderQueryAnswer, screenName, emailAddress, facebookId, openId, true,
            null, languageId, timeZoneId, greeting, comments, firstName, middleName, lastName, prefixId,
            suffixId, male, birthdayMonth, birthdayDay, birthdayYear, smsSn, facebookSn, jabberSn, skypeSn,
            twitterSn, jobTitle, groupIds, organizationIds, roleIds, userGroupRoles, userGroupIds,
            serviceContext);
}