001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.util.MethodCache; 019 import com.liferay.portal.kernel.util.ReferenceRegistry; 020 021 /** 022 * The utility for the user remote service. This utility wraps {@link com.liferay.portal.service.impl.UserServiceImpl} and is the primary access point for service operations in application layer code running on a remote server. 023 * 024 * <p> 025 * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely. 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see UserService 030 * @see com.liferay.portal.service.base.UserServiceBaseImpl 031 * @see com.liferay.portal.service.impl.UserServiceImpl 032 * @generated 033 */ 034 public class UserServiceUtil { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserServiceImpl} and rerun ServiceBuilder to regenerate this class. 039 */ 040 041 /** 042 * Adds the users to the group. 043 * 044 * @param groupId the primary key of the group 045 * @param userIds the primary keys of the users 046 * @throws PortalException if a group or user with the primary key could not 047 be found, or if the user did not have permission to assign group 048 members 049 * @throws SystemException if a system exception occurred 050 */ 051 public static void addGroupUsers(long groupId, long[] userIds, 052 com.liferay.portal.service.ServiceContext serviceContext) 053 throws com.liferay.portal.kernel.exception.PortalException, 054 com.liferay.portal.kernel.exception.SystemException { 055 getService().addGroupUsers(groupId, userIds, serviceContext); 056 } 057 058 /** 059 * Adds the users to the organization. 060 * 061 * @param organizationId the primary key of the organization 062 * @param userIds the primary keys of the users 063 * @throws PortalException if an organization or user with the primary key 064 could not be found, if the user did not have permission to assign 065 organization members, or if current user did not have an 066 organization in common with a given user 067 * @throws SystemException if a system exception occurred 068 */ 069 public static void addOrganizationUsers(long organizationId, long[] userIds) 070 throws com.liferay.portal.kernel.exception.PortalException, 071 com.liferay.portal.kernel.exception.SystemException { 072 getService().addOrganizationUsers(organizationId, userIds); 073 } 074 075 /** 076 * Assigns the password policy to the users, removing any other currently 077 * assigned password policies. 078 * 079 * @param passwordPolicyId the primary key of the password policy 080 * @param userIds the primary keys of the users 081 * @throws PortalException if the user did not have permission to assign 082 policy members 083 * @throws SystemException if a system exception occurred 084 */ 085 public static void addPasswordPolicyUsers(long passwordPolicyId, 086 long[] userIds) 087 throws com.liferay.portal.kernel.exception.PortalException, 088 com.liferay.portal.kernel.exception.SystemException { 089 getService().addPasswordPolicyUsers(passwordPolicyId, userIds); 090 } 091 092 /** 093 * Adds the users to the role. 094 * 095 * @param roleId the primary key of the role 096 * @param userIds the primary keys of the users 097 * @throws PortalException if a role or user with the primary key could not 098 be found or if the user did not have permission to assign role 099 members 100 * @throws SystemException if a system exception occurred 101 */ 102 public static void addRoleUsers(long roleId, long[] userIds) 103 throws com.liferay.portal.kernel.exception.PortalException, 104 com.liferay.portal.kernel.exception.SystemException { 105 getService().addRoleUsers(roleId, userIds); 106 } 107 108 /** 109 * Adds the users to the team. 110 * 111 * @param teamId the primary key of the team 112 * @param userIds the primary keys of the users 113 * @throws PortalException if a team or user with the primary key could not 114 be found or if the user did not have permission to assign team 115 members 116 * @throws SystemException if a system exception occurred 117 */ 118 public static void addTeamUsers(long teamId, long[] userIds) 119 throws com.liferay.portal.kernel.exception.PortalException, 120 com.liferay.portal.kernel.exception.SystemException { 121 getService().addTeamUsers(teamId, userIds); 122 } 123 124 /** 125 * Adds a user. 126 * 127 * <p> 128 * This method handles the creation and bookkeeping of the user including 129 * its resources, metadata, and internal data structures. It is not 130 * necessary to make subsequent calls to any methods to setup default 131 * groups, resources, etc. 132 * </p> 133 * 134 * @param companyId the primary key of the user's company 135 * @param autoPassword whether a password should be automatically generated 136 for the user 137 * @param password1 the user's password 138 * @param password2 the user's password confirmation 139 * @param autoScreenName whether a screen name should be automatically 140 generated for the user 141 * @param screenName the user's screen name 142 * @param emailAddress the user's email address 143 * @param facebookId the user's facebook ID 144 * @param openId the user's OpenID 145 * @param locale the user's locale 146 * @param firstName the user's first name 147 * @param middleName the user's middle name 148 * @param lastName the user's last name 149 * @param prefixId the user's name prefix ID 150 * @param suffixId the user's name suffix ID 151 * @param male whether the user is male 152 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 153 January) 154 * @param birthdayDay the user's birthday day 155 * @param birthdayYear the user's birthday year 156 * @param jobTitle the user's job title 157 * @param groupIds the primary keys of the user's groups 158 * @param organizationIds the primary keys of the user's organizations 159 * @param roleIds the primary keys of the roles this user possesses 160 * @param userGroupIds the primary keys of the user's user groups 161 * @param sendEmail whether to send the user an email notification about 162 their new account 163 * @param serviceContext the user's service context (optionally 164 <code>null</code>). Can set the universally unique identifier 165 (with the <code>uuid</code> attribute), asset category IDs, asset 166 tag names, and expando bridge attributes for the user. 167 * @return the new user 168 * @throws PortalException if the user's information was invalid, if the 169 creator did not have permission to add users, or if the email 170 address was reserved 171 * @throws SystemException if a system exception occurred 172 */ 173 public static com.liferay.portal.model.User addUser(long companyId, 174 boolean autoPassword, java.lang.String password1, 175 java.lang.String password2, boolean autoScreenName, 176 java.lang.String screenName, java.lang.String emailAddress, 177 long facebookId, java.lang.String openId, java.util.Locale locale, 178 java.lang.String firstName, java.lang.String middleName, 179 java.lang.String lastName, int prefixId, int suffixId, boolean male, 180 int birthdayMonth, int birthdayDay, int birthdayYear, 181 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 182 long[] roleIds, long[] userGroupIds, boolean sendEmail, 183 com.liferay.portal.service.ServiceContext serviceContext) 184 throws com.liferay.portal.kernel.exception.PortalException, 185 com.liferay.portal.kernel.exception.SystemException { 186 return getService() 187 .addUser(companyId, autoPassword, password1, password2, 188 autoScreenName, screenName, emailAddress, facebookId, openId, 189 locale, firstName, middleName, lastName, prefixId, suffixId, male, 190 birthdayMonth, birthdayDay, birthdayYear, jobTitle, groupIds, 191 organizationIds, roleIds, userGroupIds, sendEmail, serviceContext); 192 } 193 194 /** 195 * Adds a user with additional parameters. 196 * 197 * <p> 198 * This method handles the creation and bookkeeping of the user including 199 * its resources, metadata, and internal data structures. It is not 200 * necessary to make subsequent calls to any methods to setup default 201 * groups, resources, etc. 202 * </p> 203 * 204 * @param companyId the primary key of the user's company 205 * @param autoPassword whether a password should be automatically generated 206 for the user 207 * @param password1 the user's password 208 * @param password2 the user's password confirmation 209 * @param autoScreenName whether a screen name should be automatically 210 generated for the user 211 * @param screenName the user's screen name 212 * @param emailAddress the user's email address 213 * @param facebookId the user's facebook ID 214 * @param openId the user's OpenID 215 * @param locale the user's locale 216 * @param firstName the user's first name 217 * @param middleName the user's middle name 218 * @param lastName the user's last name 219 * @param prefixId the user's name prefix ID 220 * @param suffixId the user's name suffix ID 221 * @param male whether the user is male 222 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 223 January) 224 * @param birthdayDay the user's birthday day 225 * @param birthdayYear the user's birthday year 226 * @param jobTitle the user's job title 227 * @param groupIds the primary keys of the user's groups 228 * @param organizationIds the primary keys of the user's organizations 229 * @param roleIds the primary keys of the roles this user possesses 230 * @param userGroupIds the primary keys of the user's user groups 231 * @param addresses the user's addresses 232 * @param emailAddresses the user's email addresses 233 * @param phones the user's phone numbers 234 * @param websites the user's websites 235 * @param announcementsDelivers the announcements deliveries 236 * @param sendEmail whether to send the user an email notification about 237 their new account 238 * @param serviceContext the user's service context (optionally 239 <code>null</code>). Can set the universally unique identifier 240 (with the <code>uuid</code> attribute), asset category IDs, asset 241 tag names, and expando bridge attributes for the user. 242 * @return the new user 243 * @throws PortalException if the user's information was invalid, if the 244 creator did not have permission to add users, if the email 245 address was reserved, or some other portal exception occurred 246 * @throws SystemException if a system exception occurred 247 */ 248 public static com.liferay.portal.model.User addUser(long companyId, 249 boolean autoPassword, java.lang.String password1, 250 java.lang.String password2, boolean autoScreenName, 251 java.lang.String screenName, java.lang.String emailAddress, 252 long facebookId, java.lang.String openId, java.util.Locale locale, 253 java.lang.String firstName, java.lang.String middleName, 254 java.lang.String lastName, int prefixId, int suffixId, boolean male, 255 int birthdayMonth, int birthdayDay, int birthdayYear, 256 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 257 long[] roleIds, long[] userGroupIds, 258 java.util.List<com.liferay.portal.model.Address> addresses, 259 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 260 java.util.List<com.liferay.portal.model.Phone> phones, 261 java.util.List<com.liferay.portal.model.Website> websites, 262 java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers, 263 boolean sendEmail, 264 com.liferay.portal.service.ServiceContext serviceContext) 265 throws com.liferay.portal.kernel.exception.PortalException, 266 com.liferay.portal.kernel.exception.SystemException { 267 return getService() 268 .addUser(companyId, autoPassword, password1, password2, 269 autoScreenName, screenName, emailAddress, facebookId, openId, 270 locale, firstName, middleName, lastName, prefixId, suffixId, male, 271 birthdayMonth, birthdayDay, birthdayYear, jobTitle, groupIds, 272 organizationIds, roleIds, userGroupIds, addresses, emailAddresses, 273 phones, websites, announcementsDelivers, sendEmail, serviceContext); 274 } 275 276 /** 277 * Adds the users to the user group. 278 * 279 * @param userGroupId the primary key of the user group 280 * @param userIds the primary keys of the users 281 * @throws PortalException if a user group or user with the primary could 282 could not be found, or if the current user did not have 283 permission to assign group members 284 * @throws SystemException if a system exception occurred 285 */ 286 public static void addUserGroupUsers(long userGroupId, long[] userIds) 287 throws com.liferay.portal.kernel.exception.PortalException, 288 com.liferay.portal.kernel.exception.SystemException { 289 getService().addUserGroupUsers(userGroupId, userIds); 290 } 291 292 /** 293 * Adds a user with workflow. 294 * 295 * <p> 296 * This method handles the creation and bookkeeping of the user including 297 * its resources, metadata, and internal data structures. It is not 298 * necessary to make subsequent calls to any methods to setup default 299 * groups, resources, etc. 300 * </p> 301 * 302 * @param companyId the primary key of the user's company 303 * @param autoPassword whether a password should be automatically generated 304 for the user 305 * @param password1 the user's password 306 * @param password2 the user's password confirmation 307 * @param autoScreenName whether a screen name should be automatically 308 generated for the user 309 * @param screenName the user's screen name 310 * @param emailAddress the user's email address 311 * @param facebookId the user's facebook ID 312 * @param openId the user's OpenID 313 * @param locale the user's locale 314 * @param firstName the user's first name 315 * @param middleName the user's middle name 316 * @param lastName the user's last name 317 * @param prefixId the user's name prefix ID 318 * @param suffixId the user's name suffix ID 319 * @param male whether the user is male 320 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 321 January) 322 * @param birthdayDay the user's birthday day 323 * @param birthdayYear the user's birthday year 324 * @param jobTitle the user's job title 325 * @param groupIds the primary keys of the user's groups 326 * @param organizationIds the primary keys of the user's organizations 327 * @param roleIds the primary keys of the roles this user possesses 328 * @param userGroupIds the primary keys of the user's user groups 329 * @param sendEmail whether to send the user an email notification about 330 their new account 331 * @param serviceContext the user's service context (optionally 332 <code>null</code>). Can set the universally unique identifier 333 (with the <code>uuid</code> attribute), asset category IDs, asset 334 tag names, and expando bridge attributes for the user. 335 * @return the new user 336 * @throws PortalException if the user's information was invalid, if the 337 creator did not have permission to add users, or if the email 338 address was reserved 339 * @throws SystemException if a system exception occurred 340 */ 341 public static com.liferay.portal.model.User addUserWithWorkflow( 342 long companyId, boolean autoPassword, java.lang.String password1, 343 java.lang.String password2, boolean autoScreenName, 344 java.lang.String screenName, java.lang.String emailAddress, 345 long facebookId, java.lang.String openId, java.util.Locale locale, 346 java.lang.String firstName, java.lang.String middleName, 347 java.lang.String lastName, int prefixId, int suffixId, boolean male, 348 int birthdayMonth, int birthdayDay, int birthdayYear, 349 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 350 long[] roleIds, long[] userGroupIds, boolean sendEmail, 351 com.liferay.portal.service.ServiceContext serviceContext) 352 throws com.liferay.portal.kernel.exception.PortalException, 353 com.liferay.portal.kernel.exception.SystemException { 354 return getService() 355 .addUserWithWorkflow(companyId, autoPassword, password1, 356 password2, autoScreenName, screenName, emailAddress, facebookId, 357 openId, locale, firstName, middleName, lastName, prefixId, 358 suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, 359 groupIds, organizationIds, roleIds, userGroupIds, sendEmail, 360 serviceContext); 361 } 362 363 /** 364 * Adds a user with workflow and additional parameters. 365 * 366 * <p> 367 * This method handles the creation and bookkeeping of the user including 368 * its resources, metadata, and internal data structures. It is not 369 * necessary to make subsequent calls to any methods to setup default 370 * groups, resources, etc. 371 * </p> 372 * 373 * @param companyId the primary key of the user's company 374 * @param autoPassword whether a password should be automatically generated 375 for the user 376 * @param password1 the user's password 377 * @param password2 the user's password confirmation 378 * @param autoScreenName whether a screen name should be automatically 379 generated for the user 380 * @param screenName the user's screen name 381 * @param emailAddress the user's email address 382 * @param facebookId the user's facebook ID 383 * @param openId the user's OpenID 384 * @param locale the user's locale 385 * @param firstName the user's first name 386 * @param middleName the user's middle name 387 * @param lastName the user's last name 388 * @param prefixId the user's name prefix ID 389 * @param suffixId the user's name suffix ID 390 * @param male whether the user is male 391 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 392 January) 393 * @param birthdayDay the user's birthday day 394 * @param birthdayYear the user's birthday year 395 * @param jobTitle the user's job title 396 * @param groupIds the primary keys of the user's groups 397 * @param organizationIds the primary keys of the user's organizations 398 * @param roleIds the primary keys of the roles this user possesses 399 * @param userGroupIds the primary keys of the user's user groups 400 * @param addresses the user's addresses 401 * @param emailAddresses the user's email addresses 402 * @param phones the user's phone numbers 403 * @param websites the user's websites 404 * @param announcementsDelivers the announcements deliveries 405 * @param sendEmail whether to send the user an email notification about 406 their new account 407 * @param serviceContext the user's service context (optionally 408 <code>null</code>). Can set the universally unique identifier 409 (with the <code>uuid</code> attribute), asset category IDs, asset 410 tag names, and expando bridge attributes for the user. 411 * @return the new user 412 * @throws PortalException if the user's information was invalid, if the 413 creator did not have permission to add users, if the email 414 address was reserved, or some other portal exception occurred 415 * @throws SystemException if a system exception occurred 416 */ 417 public static com.liferay.portal.model.User addUserWithWorkflow( 418 long companyId, boolean autoPassword, java.lang.String password1, 419 java.lang.String password2, boolean autoScreenName, 420 java.lang.String screenName, java.lang.String emailAddress, 421 long facebookId, java.lang.String openId, java.util.Locale locale, 422 java.lang.String firstName, java.lang.String middleName, 423 java.lang.String lastName, int prefixId, int suffixId, boolean male, 424 int birthdayMonth, int birthdayDay, int birthdayYear, 425 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 426 long[] roleIds, long[] userGroupIds, 427 java.util.List<com.liferay.portal.model.Address> addresses, 428 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 429 java.util.List<com.liferay.portal.model.Phone> phones, 430 java.util.List<com.liferay.portal.model.Website> websites, 431 java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers, 432 boolean sendEmail, 433 com.liferay.portal.service.ServiceContext serviceContext) 434 throws com.liferay.portal.kernel.exception.PortalException, 435 com.liferay.portal.kernel.exception.SystemException { 436 return getService() 437 .addUserWithWorkflow(companyId, autoPassword, password1, 438 password2, autoScreenName, screenName, emailAddress, facebookId, 439 openId, locale, firstName, middleName, lastName, prefixId, 440 suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, 441 groupIds, organizationIds, roleIds, userGroupIds, addresses, 442 emailAddresses, phones, websites, announcementsDelivers, sendEmail, 443 serviceContext); 444 } 445 446 /** 447 * Deletes the user's portrait image. 448 * 449 * @param userId the primary key of the user 450 * @throws PortalException if a user with the primary key could not be 451 found, if the user's portrait could not be found, or if the 452 current user did not have permission to update the user 453 * @throws SystemException if a system exception occurred 454 */ 455 public static void deletePortrait(long userId) 456 throws com.liferay.portal.kernel.exception.PortalException, 457 com.liferay.portal.kernel.exception.SystemException { 458 getService().deletePortrait(userId); 459 } 460 461 /** 462 * Removes the user from the role. 463 * 464 * @param roleId the primary key of the role 465 * @param userId the primary key of the user 466 * @throws PortalException if a role or user with the primary key could not 467 be found, or if the current user did not have permission to 468 assign role members 469 * @throws SystemException if a system exception occurred 470 */ 471 public static void deleteRoleUser(long roleId, long userId) 472 throws com.liferay.portal.kernel.exception.PortalException, 473 com.liferay.portal.kernel.exception.SystemException { 474 getService().deleteRoleUser(roleId, userId); 475 } 476 477 /** 478 * Deletes the user. 479 * 480 * @param userId the primary key of the user 481 * @throws PortalException if a user with the primary key could not be found 482 or if the current user did not have permission to delete the user 483 * @throws SystemException if a system exception occurred 484 */ 485 public static void deleteUser(long userId) 486 throws com.liferay.portal.kernel.exception.PortalException, 487 com.liferay.portal.kernel.exception.SystemException { 488 getService().deleteUser(userId); 489 } 490 491 /** 492 * Returns the primary key of the default user for the company. 493 * 494 * @param companyId the primary key of the company 495 * @return the primary key of the default user for the company 496 * @throws PortalException if a default user for the company could not be 497 found 498 * @throws SystemException if a system exception occurred 499 */ 500 public static long getDefaultUserId(long companyId) 501 throws com.liferay.portal.kernel.exception.PortalException, 502 com.liferay.portal.kernel.exception.SystemException { 503 return getService().getDefaultUserId(companyId); 504 } 505 506 /** 507 * Returns the primary keys of all the users belonging to the group. 508 * 509 * @param groupId the primary key of the group 510 * @return the primary keys of the users belonging to the group 511 * @throws PortalException if the current user did not have permission to 512 view group assignments 513 * @throws SystemException if a system exception occurred 514 */ 515 public static long[] getGroupUserIds(long groupId) 516 throws com.liferay.portal.kernel.exception.PortalException, 517 com.liferay.portal.kernel.exception.SystemException { 518 return getService().getGroupUserIds(groupId); 519 } 520 521 /** 522 * Returns the primary keys of all the users belonging to the organization. 523 * 524 * @param organizationId the primary key of the organization 525 * @return the primary keys of the users belonging to the organization 526 * @throws PortalException if the current user did not have permission to 527 view organization assignments 528 * @throws SystemException if a system exception occurred 529 */ 530 public static long[] getOrganizationUserIds(long organizationId) 531 throws com.liferay.portal.kernel.exception.PortalException, 532 com.liferay.portal.kernel.exception.SystemException { 533 return getService().getOrganizationUserIds(organizationId); 534 } 535 536 /** 537 * Returns the primary keys of all the users belonging to the role. 538 * 539 * @param roleId the primary key of the role 540 * @return the primary keys of the users belonging to the role 541 * @throws PortalException if the current user did not have permission to 542 view role members 543 * @throws SystemException if a system exception occurred 544 */ 545 public static long[] getRoleUserIds(long roleId) 546 throws com.liferay.portal.kernel.exception.PortalException, 547 com.liferay.portal.kernel.exception.SystemException { 548 return getService().getRoleUserIds(roleId); 549 } 550 551 /** 552 * Returns the user with the email address. 553 * 554 * @param companyId the primary key of the user's company 555 * @param emailAddress the user's email address 556 * @return the user with the email address 557 * @throws PortalException if a user with the email address could not be 558 found or if the current user did not have permission to view the 559 user 560 * @throws SystemException if a system exception occurred 561 */ 562 public static com.liferay.portal.model.User getUserByEmailAddress( 563 long companyId, java.lang.String emailAddress) 564 throws com.liferay.portal.kernel.exception.PortalException, 565 com.liferay.portal.kernel.exception.SystemException { 566 return getService().getUserByEmailAddress(companyId, emailAddress); 567 } 568 569 /** 570 * Returns the user with the primary key. 571 * 572 * @param userId the primary key of the user 573 * @return the user with the primary key 574 * @throws PortalException if a user with the primary key could not be found 575 or if the current user did not have permission to view the user 576 * @throws SystemException if a system exception occurred 577 */ 578 public static com.liferay.portal.model.User getUserById(long userId) 579 throws com.liferay.portal.kernel.exception.PortalException, 580 com.liferay.portal.kernel.exception.SystemException { 581 return getService().getUserById(userId); 582 } 583 584 /** 585 * Returns the user with the screen name. 586 * 587 * @param companyId the primary key of the user's company 588 * @param screenName the user's screen name 589 * @return the user with the screen name 590 * @throws PortalException if a user with the screen name could not be found 591 or if the current user did not have permission to veiw the user 592 * @throws SystemException if a system exception occurred 593 */ 594 public static com.liferay.portal.model.User getUserByScreenName( 595 long companyId, java.lang.String screenName) 596 throws com.liferay.portal.kernel.exception.PortalException, 597 com.liferay.portal.kernel.exception.SystemException { 598 return getService().getUserByScreenName(companyId, screenName); 599 } 600 601 /** 602 * Returns the primary key of the user with the email address. 603 * 604 * @param companyId the primary key of the user's company 605 * @param emailAddress the user's email address 606 * @return the primary key of the user with the email address 607 * @throws PortalException if a user with the email address could not be 608 found 609 * @throws SystemException if a system exception occurred 610 */ 611 public static long getUserIdByEmailAddress(long companyId, 612 java.lang.String emailAddress) 613 throws com.liferay.portal.kernel.exception.PortalException, 614 com.liferay.portal.kernel.exception.SystemException { 615 return getService().getUserIdByEmailAddress(companyId, emailAddress); 616 } 617 618 /** 619 * Returns the primary key of the user with the screen name. 620 * 621 * @param companyId the primary key of the user's company 622 * @param screenName the user's screen name 623 * @return the primary key of the user with the screen name 624 * @throws PortalException if a user with the screen name could not be found 625 * @throws SystemException if a system exception occurred 626 */ 627 public static long getUserIdByScreenName(long companyId, 628 java.lang.String screenName) 629 throws com.liferay.portal.kernel.exception.PortalException, 630 com.liferay.portal.kernel.exception.SystemException { 631 return getService().getUserIdByScreenName(companyId, screenName); 632 } 633 634 /** 635 * Returns <code>true</code> if the user is a member of the group. 636 * 637 * @param groupId the primary key of the group 638 * @param userId the primary key of the user 639 * @return <code>true</code> if the user is a member of the group; 640 <code>false</code> otherwise 641 * @throws SystemException if a system exception occurred 642 */ 643 public static boolean hasGroupUser(long groupId, long userId) 644 throws com.liferay.portal.kernel.exception.SystemException { 645 return getService().hasGroupUser(groupId, userId); 646 } 647 648 /** 649 * Returns <code>true</code> if the user is a member of the role. 650 * 651 * @param roleId the primary key of the role 652 * @param userId the primary key of the user 653 * @return <code>true</code> if the user is a member of the role; 654 <code>false</code> otherwise 655 * @throws SystemException if a system exception occurred 656 */ 657 public static boolean hasRoleUser(long roleId, long userId) 658 throws com.liferay.portal.kernel.exception.SystemException { 659 return getService().hasRoleUser(roleId, userId); 660 } 661 662 /** 663 * Returns <code>true</code> if the user has the role with the name, 664 * optionally through inheritance. 665 * 666 * @param companyId the primary key of the role's company 667 * @param name the name of the role (must be a regular role, not an 668 organization, site or provider role) 669 * @param userId the primary key of the user 670 * @param inherited whether to include roles inherited from organizations, 671 sites, etc. 672 * @return <code>true</code> if the user has the role; <code>false</code> 673 otherwise 674 * @throws PortalException if a role with the name could not be found 675 * @throws SystemException if a system exception occurred 676 */ 677 public static boolean hasRoleUser(long companyId, java.lang.String name, 678 long userId, boolean inherited) 679 throws com.liferay.portal.kernel.exception.PortalException, 680 com.liferay.portal.kernel.exception.SystemException { 681 return getService().hasRoleUser(companyId, name, userId, inherited); 682 } 683 684 /** 685 * Sets the users in the role, removing and adding users to the role as 686 * necessary. 687 * 688 * @param roleId the primary key of the role 689 * @param userIds the primary keys of the users 690 * @throws PortalException if the current user did not have permission to 691 assign role members 692 * @throws SystemException if a system exception occurred 693 */ 694 public static void setRoleUsers(long roleId, long[] userIds) 695 throws com.liferay.portal.kernel.exception.PortalException, 696 com.liferay.portal.kernel.exception.SystemException { 697 getService().setRoleUsers(roleId, userIds); 698 } 699 700 /** 701 * Sets the users in the user group, removing and adding users to the user 702 * group as necessary. 703 * 704 * @param userGroupId the primary key of the user group 705 * @param userIds the primary keys of the users 706 * @throws PortalException if the current user did not have permission to 707 assign group members 708 * @throws SystemException if a system exception occurred 709 */ 710 public static void setUserGroupUsers(long userGroupId, long[] userIds) 711 throws com.liferay.portal.kernel.exception.PortalException, 712 com.liferay.portal.kernel.exception.SystemException { 713 getService().setUserGroupUsers(userGroupId, userIds); 714 } 715 716 /** 717 * Removes the users from the group. 718 * 719 * @param groupId the primary key of the group 720 * @param userIds the primary keys of the users 721 * @throws PortalException if the current user did not have permission to 722 modify group assignments 723 * @throws SystemException if a system exception occurred 724 */ 725 public static void unsetGroupUsers(long groupId, long[] userIds, 726 com.liferay.portal.service.ServiceContext serviceContext) 727 throws com.liferay.portal.kernel.exception.PortalException, 728 com.liferay.portal.kernel.exception.SystemException { 729 getService().unsetGroupUsers(groupId, userIds, serviceContext); 730 } 731 732 /** 733 * Removes the users from the organization. 734 * 735 * @param organizationId the primary key of the organization 736 * @param userIds the primary keys of the users 737 * @throws PortalException if the current user did not have permission to 738 modify organization assignments 739 * @throws SystemException if a system exception occurred 740 */ 741 public static void unsetOrganizationUsers(long organizationId, 742 long[] userIds) 743 throws com.liferay.portal.kernel.exception.PortalException, 744 com.liferay.portal.kernel.exception.SystemException { 745 getService().unsetOrganizationUsers(organizationId, userIds); 746 } 747 748 /** 749 * Removes the users from the password policy. 750 * 751 * @param passwordPolicyId the primary key of the password policy 752 * @param userIds the primary keys of the users 753 * @throws PortalException if the current user did not have permission to 754 modify policy assignments 755 * @throws SystemException if a system exception occurred 756 */ 757 public static void unsetPasswordPolicyUsers(long passwordPolicyId, 758 long[] userIds) 759 throws com.liferay.portal.kernel.exception.PortalException, 760 com.liferay.portal.kernel.exception.SystemException { 761 getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds); 762 } 763 764 /** 765 * Removes the users from the role. 766 * 767 * @param roleId the primary key of the role 768 * @param userIds the primary keys of the users 769 * @throws PortalException if the current user did not have permission to 770 modify role assignments 771 * @throws SystemException if a system exception occurred 772 */ 773 public static void unsetRoleUsers(long roleId, long[] userIds) 774 throws com.liferay.portal.kernel.exception.PortalException, 775 com.liferay.portal.kernel.exception.SystemException { 776 getService().unsetRoleUsers(roleId, userIds); 777 } 778 779 /** 780 * Removes the users from the team. 781 * 782 * @param teamId the primary key of the team 783 * @param userIds the primary keys of the users 784 * @throws PortalException if the current user did not have permission to 785 modify team assignments 786 * @throws SystemException if a system exception occurred 787 */ 788 public static void unsetTeamUsers(long teamId, long[] userIds) 789 throws com.liferay.portal.kernel.exception.PortalException, 790 com.liferay.portal.kernel.exception.SystemException { 791 getService().unsetTeamUsers(teamId, userIds); 792 } 793 794 /** 795 * Removes the users from the user group. 796 * 797 * @param userGroupId the primary key of the user group 798 * @param userIds the primary keys of the users 799 * @throws PortalException if the current user did not have permission to 800 modify user group assignments 801 * @throws SystemException if a system exception occurred 802 */ 803 public static void unsetUserGroupUsers(long userGroupId, long[] userIds) 804 throws com.liferay.portal.kernel.exception.PortalException, 805 com.liferay.portal.kernel.exception.SystemException { 806 getService().unsetUserGroupUsers(userGroupId, userIds); 807 } 808 809 /** 810 * Updates the user's response to the terms of use agreement. 811 * 812 * @param userId the primary key of the user 813 * @param agreedToTermsOfUse whether the user has agree to the terms of use 814 * @return the user 815 * @throws PortalException if the current user did not have permission to 816 update the user's agreement to terms-of-use 817 * @throws SystemException if a system exception occurred 818 */ 819 public static com.liferay.portal.model.User updateAgreedToTermsOfUse( 820 long userId, boolean agreedToTermsOfUse) 821 throws com.liferay.portal.kernel.exception.PortalException, 822 com.liferay.portal.kernel.exception.SystemException { 823 return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse); 824 } 825 826 /** 827 * Updates the user's email address. 828 * 829 * @param userId the primary key of the user 830 * @param password the user's password 831 * @param emailAddress1 the user's new email address 832 * @param emailAddress2 the user's new email address confirmation 833 * @return the user 834 * @throws PortalException if a user with the primary key could not be found 835 or if the current user did not have permission to update the user 836 * @throws SystemException if a system exception occurred 837 */ 838 public static com.liferay.portal.model.User updateEmailAddress( 839 long userId, java.lang.String password, java.lang.String emailAddress1, 840 java.lang.String emailAddress2, 841 com.liferay.portal.service.ServiceContext serviceContext) 842 throws com.liferay.portal.kernel.exception.PortalException, 843 com.liferay.portal.kernel.exception.SystemException { 844 return getService() 845 .updateEmailAddress(userId, password, emailAddress1, 846 emailAddress2, serviceContext); 847 } 848 849 /** 850 * Updates a user account that was automatically created when a guest user 851 * participated in an action (e.g. posting a comment) and only provided his 852 * name and email address. 853 * 854 * @param companyId the primary key of the user's company 855 * @param autoPassword whether a password should be automatically generated 856 for the user 857 * @param password1 the user's password 858 * @param password2 the user's password confirmation 859 * @param autoScreenName whether a screen name should be automatically 860 generated for the user 861 * @param screenName the user's screen name 862 * @param emailAddress the user's email address 863 * @param facebookId the user's facebook ID 864 * @param openId the user's OpenID 865 * @param locale the user's locale 866 * @param firstName the user's first name 867 * @param middleName the user's middle name 868 * @param lastName the user's last name 869 * @param prefixId the user's name prefix ID 870 * @param suffixId the user's name suffix ID 871 * @param male whether the user is male 872 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 873 January) 874 * @param birthdayDay the user's birthday day 875 * @param birthdayYear the user's birthday year 876 * @param jobTitle the user's job title 877 * @param updateUserInformation whether to update the user's information 878 * @param sendEmail whether to send the user an email notification about 879 their new account 880 * @param serviceContext the user's service context (optionally 881 <code>null</code>). Can set the expando bridge attributes for the 882 user. 883 * @return the user 884 * @throws PortalException if the user's information was invalid or if the 885 email address was reserved 886 * @throws SystemException if a system exception occurred 887 */ 888 public static com.liferay.portal.model.User updateIncompleteUser( 889 long companyId, boolean autoPassword, java.lang.String password1, 890 java.lang.String password2, boolean autoScreenName, 891 java.lang.String screenName, java.lang.String emailAddress, 892 long facebookId, java.lang.String openId, java.util.Locale locale, 893 java.lang.String firstName, java.lang.String middleName, 894 java.lang.String lastName, int prefixId, int suffixId, boolean male, 895 int birthdayMonth, int birthdayDay, int birthdayYear, 896 java.lang.String jobTitle, boolean updateUserInformation, 897 boolean sendEmail, 898 com.liferay.portal.service.ServiceContext serviceContext) 899 throws com.liferay.portal.kernel.exception.PortalException, 900 com.liferay.portal.kernel.exception.SystemException { 901 return getService() 902 .updateIncompleteUser(companyId, autoPassword, password1, 903 password2, autoScreenName, screenName, emailAddress, facebookId, 904 openId, locale, firstName, middleName, lastName, prefixId, 905 suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, 906 updateUserInformation, sendEmail, serviceContext); 907 } 908 909 /** 910 * Updates whether the user is locked out from logging in. 911 * 912 * @param userId the primary key of the user 913 * @param lockout whether the user is locked out 914 * @return the user 915 * @throws PortalException if the user did not have permission to lock out 916 the user 917 * @throws SystemException if a system exception occurred 918 */ 919 public static com.liferay.portal.model.User updateLockoutById(long userId, 920 boolean lockout) 921 throws com.liferay.portal.kernel.exception.PortalException, 922 com.liferay.portal.kernel.exception.SystemException { 923 return getService().updateLockoutById(userId, lockout); 924 } 925 926 /** 927 * Updates the user's OpenID. 928 * 929 * @param userId the primary key of the user 930 * @param openId the new OpenID 931 * @return the user 932 * @throws PortalException if a user with the primary key could not be found 933 or if the current user did not have permission to update the user 934 * @throws SystemException if a system exception occurred 935 */ 936 public static com.liferay.portal.model.User updateOpenId(long userId, 937 java.lang.String openId) 938 throws com.liferay.portal.kernel.exception.PortalException, 939 com.liferay.portal.kernel.exception.SystemException { 940 return getService().updateOpenId(userId, openId); 941 } 942 943 /** 944 * Sets the organizations that the user is in, removing and adding 945 * organizations as necessary. 946 * 947 * @param userId the primary key of the user 948 * @param organizationIds the primary keys of the organizations 949 * @throws PortalException if a user with the primary key could not be found 950 or if the current user did not have permission to update the user 951 * @throws SystemException if a system exception occurred 952 */ 953 public static void updateOrganizations(long userId, long[] organizationIds, 954 com.liferay.portal.service.ServiceContext serviceContext) 955 throws com.liferay.portal.kernel.exception.PortalException, 956 com.liferay.portal.kernel.exception.SystemException { 957 getService().updateOrganizations(userId, organizationIds, serviceContext); 958 } 959 960 /** 961 * Updates the user's password without tracking or validation of the change. 962 * 963 * @param userId the primary key of the user 964 * @param password1 the user's new password 965 * @param password2 the user's new password confirmation 966 * @param passwordReset whether the user should be asked to reset their 967 password the next time they log in 968 * @return the user 969 * @throws PortalException if a user with the primary key could not be found 970 or if the current user did not have permission to update the user 971 * @throws SystemException if a system exception occurred 972 */ 973 public static com.liferay.portal.model.User updatePassword(long userId, 974 java.lang.String password1, java.lang.String password2, 975 boolean passwordReset) 976 throws com.liferay.portal.kernel.exception.PortalException, 977 com.liferay.portal.kernel.exception.SystemException { 978 return getService() 979 .updatePassword(userId, password1, password2, passwordReset); 980 } 981 982 /** 983 * Updates the user's portrait image. 984 * 985 * @param userId the primary key of the user 986 * @param bytes the new portrait image data 987 * @return the user 988 * @throws PortalException if a user with the primary key could not be 989 found, if the new portrait was invalid, or if the current user 990 did not have permission to update the user 991 * @throws SystemException if a system exception occurred 992 */ 993 public static com.liferay.portal.model.User updatePortrait(long userId, 994 byte[] bytes) 995 throws com.liferay.portal.kernel.exception.PortalException, 996 com.liferay.portal.kernel.exception.SystemException { 997 return getService().updatePortrait(userId, bytes); 998 } 999 1000 /** 1001 * Updates the user's password reset question and answer. 1002 * 1003 * @param userId the primary key of the user 1004 * @param question the user's new password reset question 1005 * @param answer the user's new password reset answer 1006 * @return the user 1007 * @throws PortalException if a user with the primary key could not be 1008 found, if the new question or answer were invalid, or if the 1009 current user did not have permission to update the user 1010 * @throws SystemException if a system exception occurred 1011 */ 1012 public static com.liferay.portal.model.User updateReminderQuery( 1013 long userId, java.lang.String question, java.lang.String answer) 1014 throws com.liferay.portal.kernel.exception.PortalException, 1015 com.liferay.portal.kernel.exception.SystemException { 1016 return getService().updateReminderQuery(userId, question, answer); 1017 } 1018 1019 /** 1020 * Updates the user's screen name. 1021 * 1022 * @param userId the primary key of the user 1023 * @param screenName the user's new screen name 1024 * @return the user 1025 * @throws PortalException if a user with the primary key could not be 1026 found, if the new screen name was invalid, or if the current user 1027 did not have permission to update the user 1028 * @throws SystemException if a system exception occurred 1029 */ 1030 public static com.liferay.portal.model.User updateScreenName(long userId, 1031 java.lang.String screenName) 1032 throws com.liferay.portal.kernel.exception.PortalException, 1033 com.liferay.portal.kernel.exception.SystemException { 1034 return getService().updateScreenName(userId, screenName); 1035 } 1036 1037 /** 1038 * Updates the user's workflow status. 1039 * 1040 * @param userId the primary key of the user 1041 * @param status the user's new workflow status 1042 * @return the user 1043 * @throws PortalException if a user with the primary key could not be 1044 found, if the current user was updating her own status to 1045 anything but {@link WorkflowConstants.STATUS_APPROVED}, or if the 1046 current user did not have permission to update the user's 1047 workflow status. 1048 * @throws SystemException if a system exception occurred 1049 */ 1050 public static com.liferay.portal.model.User updateStatus(long userId, 1051 int status) 1052 throws com.liferay.portal.kernel.exception.PortalException, 1053 com.liferay.portal.kernel.exception.SystemException { 1054 return getService().updateStatus(userId, status); 1055 } 1056 1057 /** 1058 * Updates the user with additional parameters. 1059 * 1060 * @param userId the primary key of the user 1061 * @param oldPassword the user's old password 1062 * @param newPassword1 the user's new password (optionally 1063 <code>null</code>) 1064 * @param newPassword2 the user's new password confirmation (optionally 1065 <code>null</code>) 1066 * @param passwordReset whether the user should be asked to reset their 1067 password the next time they login 1068 * @param reminderQueryQuestion the user's new password reset question 1069 * @param reminderQueryAnswer the user's new password reset answer 1070 * @param screenName the user's new screen name 1071 * @param emailAddress the user's new email address 1072 * @param facebookId the user's new Facebook ID 1073 * @param openId the user's new OpenID 1074 * @param languageId the user's new language ID 1075 * @param timeZoneId the user's new time zone ID 1076 * @param greeting the user's new greeting 1077 * @param comments the user's new comments 1078 * @param firstName the user's new first name 1079 * @param middleName the user's new middle name 1080 * @param lastName the user's new last name 1081 * @param prefixId the user's new name prefix ID 1082 * @param suffixId the user's new name suffix ID 1083 * @param male whether user is male 1084 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 1085 for January) 1086 * @param birthdayDay the user's new birthday day 1087 * @param birthdayYear the user's birthday year 1088 * @param smsSn the user's new SMS screen name 1089 * @param aimSn the user's new AIM screen name 1090 * @param facebookSn the user's new Facebook screen name 1091 * @param icqSn the user's new ICQ screen name 1092 * @param jabberSn the user's new Jabber screen name 1093 * @param msnSn the user's new MSN screen name 1094 * @param mySpaceSn the user's new MySpace screen name 1095 * @param skypeSn the user's new Skype screen name 1096 * @param twitterSn the user's new Twitter screen name 1097 * @param ymSn the user's new Yahoo! Messenger screen name 1098 * @param jobTitle the user's new job title 1099 * @param groupIds the primary keys of the user's groups 1100 * @param organizationIds the primary keys of the user's organizations 1101 * @param roleIds the primary keys of the user's roles 1102 * @param userGroupRoles the user user's group roles 1103 * @param userGroupIds the primary keys of the user's user groups 1104 * @param addresses the user's addresses 1105 * @param emailAddresses the user's email addresses 1106 * @param phones the user's phone numbers 1107 * @param websites the user's websites 1108 * @param announcementsDelivers the announcements deliveries 1109 * @param serviceContext the user's service context (optionally 1110 <code>null</code>). Can set the universally unique identifier 1111 (with the <code>uuid</code> attribute), asset category IDs, asset 1112 tag names, and expando bridge attributes for the user. 1113 * @return the user 1114 * @throws PortalException if a user with the primary key could not be 1115 found, if the new information was invalid, or if the current user 1116 did not have permission to update the user 1117 * @throws SystemException if a system exception occurred 1118 */ 1119 public static com.liferay.portal.model.User updateUser(long userId, 1120 java.lang.String oldPassword, java.lang.String newPassword1, 1121 java.lang.String newPassword2, boolean passwordReset, 1122 java.lang.String reminderQueryQuestion, 1123 java.lang.String reminderQueryAnswer, java.lang.String screenName, 1124 java.lang.String emailAddress, long facebookId, 1125 java.lang.String openId, java.lang.String languageId, 1126 java.lang.String timeZoneId, java.lang.String greeting, 1127 java.lang.String comments, java.lang.String firstName, 1128 java.lang.String middleName, java.lang.String lastName, int prefixId, 1129 int suffixId, boolean male, int birthdayMonth, int birthdayDay, 1130 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, 1131 java.lang.String facebookSn, java.lang.String icqSn, 1132 java.lang.String jabberSn, java.lang.String msnSn, 1133 java.lang.String mySpaceSn, java.lang.String skypeSn, 1134 java.lang.String twitterSn, java.lang.String ymSn, 1135 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 1136 long[] roleIds, 1137 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles, 1138 long[] userGroupIds, 1139 java.util.List<com.liferay.portal.model.Address> addresses, 1140 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 1141 java.util.List<com.liferay.portal.model.Phone> phones, 1142 java.util.List<com.liferay.portal.model.Website> websites, 1143 java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers, 1144 com.liferay.portal.service.ServiceContext serviceContext) 1145 throws com.liferay.portal.kernel.exception.PortalException, 1146 com.liferay.portal.kernel.exception.SystemException { 1147 return getService() 1148 .updateUser(userId, oldPassword, newPassword1, newPassword2, 1149 passwordReset, reminderQueryQuestion, reminderQueryAnswer, 1150 screenName, emailAddress, facebookId, openId, languageId, 1151 timeZoneId, greeting, comments, firstName, middleName, lastName, 1152 prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear, 1153 smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn, 1154 skypeSn, twitterSn, ymSn, jobTitle, groupIds, organizationIds, 1155 roleIds, userGroupRoles, userGroupIds, addresses, emailAddresses, 1156 phones, websites, announcementsDelivers, serviceContext); 1157 } 1158 1159 /** 1160 * Updates the user. 1161 * 1162 * @param userId the primary key of the user 1163 * @param oldPassword the user's old password 1164 * @param newPassword1 the user's new password (optionally 1165 <code>null</code>) 1166 * @param newPassword2 the user's new password confirmation (optionally 1167 <code>null</code>) 1168 * @param passwordReset whether the user should be asked to reset their 1169 password the next time they login 1170 * @param reminderQueryQuestion the user's new password reset question 1171 * @param reminderQueryAnswer the user's new password reset answer 1172 * @param screenName the user's new screen name 1173 * @param emailAddress the user's new email address 1174 * @param facebookId the user's new Facebook ID 1175 * @param openId the user's new OpenID 1176 * @param languageId the user's new language ID 1177 * @param timeZoneId the user's new time zone ID 1178 * @param greeting the user's new greeting 1179 * @param comments the user's new comments 1180 * @param firstName the user's new first name 1181 * @param middleName the user's new middle name 1182 * @param lastName the user's new last name 1183 * @param prefixId the user's new name prefix ID 1184 * @param suffixId the user's new name suffix ID 1185 * @param male whether user is male 1186 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 1187 for January) 1188 * @param birthdayDay the user's new birthday day 1189 * @param birthdayYear the user's birthday year 1190 * @param smsSn the user's new SMS screen name 1191 * @param aimSn the user's new AIM screen name 1192 * @param facebookSn the user's new Facebook screen name 1193 * @param icqSn the user's new ICQ screen name 1194 * @param jabberSn the user's new Jabber screen name 1195 * @param msnSn the user's new MSN screen name 1196 * @param mySpaceSn the user's new MySpace screen name 1197 * @param skypeSn the user's new Skype screen name 1198 * @param twitterSn the user's new Twitter screen name 1199 * @param ymSn the user's new Yahoo! Messenger screen name 1200 * @param jobTitle the user's new job title 1201 * @param groupIds the primary keys of the user's groups 1202 * @param organizationIds the primary keys of the user's organizations 1203 * @param roleIds the primary keys of the user's roles 1204 * @param userGroupRoles the user user's group roles 1205 * @param userGroupIds the primary keys of the user's user groups 1206 * @param serviceContext the user's service context (optionally 1207 <code>null</code>). Can set the universally unique identifier 1208 (with the <code>uuid</code> attribute), asset category IDs, asset 1209 tag names, and expando bridge attributes for the user. 1210 * @return the user 1211 * @throws PortalException if a user with the primary key could not be 1212 found, if the new information was invalid, or if the current user 1213 did not have permission to update the user 1214 * @throws SystemException if a system exception occurred 1215 */ 1216 public static com.liferay.portal.model.User updateUser(long userId, 1217 java.lang.String oldPassword, java.lang.String newPassword1, 1218 java.lang.String newPassword2, boolean passwordReset, 1219 java.lang.String reminderQueryQuestion, 1220 java.lang.String reminderQueryAnswer, java.lang.String screenName, 1221 java.lang.String emailAddress, long facebookId, 1222 java.lang.String openId, java.lang.String languageId, 1223 java.lang.String timeZoneId, java.lang.String greeting, 1224 java.lang.String comments, java.lang.String firstName, 1225 java.lang.String middleName, java.lang.String lastName, int prefixId, 1226 int suffixId, boolean male, int birthdayMonth, int birthdayDay, 1227 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, 1228 java.lang.String facebookSn, java.lang.String icqSn, 1229 java.lang.String jabberSn, java.lang.String msnSn, 1230 java.lang.String mySpaceSn, java.lang.String skypeSn, 1231 java.lang.String twitterSn, java.lang.String ymSn, 1232 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 1233 long[] roleIds, 1234 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles, 1235 long[] userGroupIds, 1236 com.liferay.portal.service.ServiceContext serviceContext) 1237 throws com.liferay.portal.kernel.exception.PortalException, 1238 com.liferay.portal.kernel.exception.SystemException { 1239 return getService() 1240 .updateUser(userId, oldPassword, newPassword1, newPassword2, 1241 passwordReset, reminderQueryQuestion, reminderQueryAnswer, 1242 screenName, emailAddress, facebookId, openId, languageId, 1243 timeZoneId, greeting, comments, firstName, middleName, lastName, 1244 prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear, 1245 smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn, 1246 skypeSn, twitterSn, ymSn, jobTitle, groupIds, organizationIds, 1247 roleIds, userGroupRoles, userGroupIds, serviceContext); 1248 } 1249 1250 public static UserService getService() { 1251 if (_service == null) { 1252 _service = (UserService)PortalBeanLocatorUtil.locate(UserService.class.getName()); 1253 1254 ReferenceRegistry.registerReference(UserServiceUtil.class, 1255 "_service"); 1256 MethodCache.remove(UserService.class); 1257 } 1258 1259 return _service; 1260 } 1261 1262 public void setService(UserService service) { 1263 MethodCache.remove(UserService.class); 1264 1265 _service = service; 1266 1267 ReferenceRegistry.registerReference(UserServiceUtil.class, "_service"); 1268 MethodCache.remove(UserService.class); 1269 } 1270 1271 private static UserService _service; 1272 }