001 /** 002 * Copyright (c) 2000-2011 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 with additional parameters. 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 addresses the user's addresses 162 * @param emailAddresses the user's email addresses 163 * @param phones the user's phone numbers 164 * @param websites the user's websites 165 * @param announcementsDelivers the announcements deliveries 166 * @param sendEmail whether to send the user an email notification about 167 their new account 168 * @param serviceContext the user's service context (optionally 169 <code>null</code>). Can set the universally unique identifier 170 (with the <code>uuid</code> attribute), asset category IDs, asset 171 tag names, and expando bridge attributes for the user. 172 * @return the new user 173 * @throws PortalException if the user's information was invalid, if the 174 creator did not have permission to add users, if the email 175 address was reserved, or some other portal exception occurred 176 * @throws SystemException if a system exception occurred 177 */ 178 public static com.liferay.portal.model.User addUser(long companyId, 179 boolean autoPassword, java.lang.String password1, 180 java.lang.String password2, boolean autoScreenName, 181 java.lang.String screenName, java.lang.String emailAddress, 182 long facebookId, java.lang.String openId, java.util.Locale locale, 183 java.lang.String firstName, java.lang.String middleName, 184 java.lang.String lastName, int prefixId, int suffixId, boolean male, 185 int birthdayMonth, int birthdayDay, int birthdayYear, 186 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 187 long[] roleIds, long[] userGroupIds, 188 java.util.List<com.liferay.portal.model.Address> addresses, 189 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 190 java.util.List<com.liferay.portal.model.Phone> phones, 191 java.util.List<com.liferay.portal.model.Website> websites, 192 java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers, 193 boolean sendEmail, 194 com.liferay.portal.service.ServiceContext serviceContext) 195 throws com.liferay.portal.kernel.exception.PortalException, 196 com.liferay.portal.kernel.exception.SystemException { 197 return getService() 198 .addUser(companyId, autoPassword, password1, password2, 199 autoScreenName, screenName, emailAddress, facebookId, openId, 200 locale, firstName, middleName, lastName, prefixId, suffixId, male, 201 birthdayMonth, birthdayDay, birthdayYear, jobTitle, groupIds, 202 organizationIds, roleIds, userGroupIds, addresses, emailAddresses, 203 phones, websites, announcementsDelivers, sendEmail, serviceContext); 204 } 205 206 /** 207 * Adds a user. 208 * 209 * <p> 210 * This method handles the creation and bookkeeping of the user including 211 * its resources, metadata, and internal data structures. It is not 212 * necessary to make subsequent calls to any methods to setup default 213 * groups, resources, etc. 214 * </p> 215 * 216 * @param companyId the primary key of the user's company 217 * @param autoPassword whether a password should be automatically generated 218 for the user 219 * @param password1 the user's password 220 * @param password2 the user's password confirmation 221 * @param autoScreenName whether a screen name should be automatically 222 generated for the user 223 * @param screenName the user's screen name 224 * @param emailAddress the user's email address 225 * @param facebookId the user's facebook ID 226 * @param openId the user's OpenID 227 * @param locale the user's locale 228 * @param firstName the user's first name 229 * @param middleName the user's middle name 230 * @param lastName the user's last name 231 * @param prefixId the user's name prefix ID 232 * @param suffixId the user's name suffix ID 233 * @param male whether the user is male 234 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 235 January) 236 * @param birthdayDay the user's birthday day 237 * @param birthdayYear the user's birthday year 238 * @param jobTitle the user's job title 239 * @param groupIds the primary keys of the user's groups 240 * @param organizationIds the primary keys of the user's organizations 241 * @param roleIds the primary keys of the roles this user possesses 242 * @param userGroupIds the primary keys of the user's user groups 243 * @param sendEmail whether to send the user an email notification about 244 their new account 245 * @param serviceContext the user's service context (optionally 246 <code>null</code>). Can set the universally unique identifier 247 (with the <code>uuid</code> attribute), asset category IDs, asset 248 tag names, and expando bridge attributes for the user. 249 * @return the new user 250 * @throws PortalException if the user's information was invalid, if the 251 creator did not have permission to add users, or if the email 252 address was reserved 253 * @throws SystemException if a system exception occurred 254 */ 255 public static com.liferay.portal.model.User addUser(long companyId, 256 boolean autoPassword, java.lang.String password1, 257 java.lang.String password2, boolean autoScreenName, 258 java.lang.String screenName, java.lang.String emailAddress, 259 long facebookId, java.lang.String openId, java.util.Locale locale, 260 java.lang.String firstName, java.lang.String middleName, 261 java.lang.String lastName, int prefixId, int suffixId, boolean male, 262 int birthdayMonth, int birthdayDay, int birthdayYear, 263 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 264 long[] roleIds, long[] userGroupIds, boolean sendEmail, 265 com.liferay.portal.service.ServiceContext serviceContext) 266 throws com.liferay.portal.kernel.exception.PortalException, 267 com.liferay.portal.kernel.exception.SystemException { 268 return getService() 269 .addUser(companyId, autoPassword, password1, password2, 270 autoScreenName, screenName, emailAddress, facebookId, openId, 271 locale, firstName, middleName, lastName, prefixId, suffixId, male, 272 birthdayMonth, birthdayDay, birthdayYear, jobTitle, groupIds, 273 organizationIds, roleIds, userGroupIds, sendEmail, serviceContext); 274 } 275 276 /** 277 * Adds a user with workflow and additional parameters. 278 * 279 * <p> 280 * This method handles the creation and bookkeeping of the user including 281 * its resources, metadata, and internal data structures. It is not 282 * necessary to make subsequent calls to any methods to setup default 283 * groups, resources, etc. 284 * </p> 285 * 286 * @param companyId the primary key of the user's company 287 * @param autoPassword whether a password should be automatically generated 288 for the user 289 * @param password1 the user's password 290 * @param password2 the user's password confirmation 291 * @param autoScreenName whether a screen name should be automatically 292 generated for the user 293 * @param screenName the user's screen name 294 * @param emailAddress the user's email address 295 * @param facebookId the user's facebook ID 296 * @param openId the user's OpenID 297 * @param locale the user's locale 298 * @param firstName the user's first name 299 * @param middleName the user's middle name 300 * @param lastName the user's last name 301 * @param prefixId the user's name prefix ID 302 * @param suffixId the user's name suffix ID 303 * @param male whether the user is male 304 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 305 January) 306 * @param birthdayDay the user's birthday day 307 * @param birthdayYear the user's birthday year 308 * @param jobTitle the user's job title 309 * @param groupIds the primary keys of the user's groups 310 * @param organizationIds the primary keys of the user's organizations 311 * @param roleIds the primary keys of the roles this user possesses 312 * @param userGroupIds the primary keys of the user's user groups 313 * @param addresses the user's addresses 314 * @param emailAddresses the user's email addresses 315 * @param phones the user's phone numbers 316 * @param websites the user's websites 317 * @param announcementsDelivers the announcements deliveries 318 * @param sendEmail whether to send the user an email notification about 319 their new account 320 * @param serviceContext the user's service context (optionally 321 <code>null</code>). Can set the universally unique identifier 322 (with the <code>uuid</code> attribute), asset category IDs, asset 323 tag names, and expando bridge attributes for the user. 324 * @return the new user 325 * @throws PortalException if the user's information was invalid, if the 326 creator did not have permission to add users, if the email 327 address was reserved, or some other portal exception occurred 328 * @throws SystemException if a system exception occurred 329 */ 330 public static com.liferay.portal.model.User addUserWithWorkflow( 331 long companyId, boolean autoPassword, java.lang.String password1, 332 java.lang.String password2, boolean autoScreenName, 333 java.lang.String screenName, java.lang.String emailAddress, 334 long facebookId, java.lang.String openId, java.util.Locale locale, 335 java.lang.String firstName, java.lang.String middleName, 336 java.lang.String lastName, int prefixId, int suffixId, boolean male, 337 int birthdayMonth, int birthdayDay, int birthdayYear, 338 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 339 long[] roleIds, long[] userGroupIds, 340 java.util.List<com.liferay.portal.model.Address> addresses, 341 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 342 java.util.List<com.liferay.portal.model.Phone> phones, 343 java.util.List<com.liferay.portal.model.Website> websites, 344 java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers, 345 boolean sendEmail, 346 com.liferay.portal.service.ServiceContext serviceContext) 347 throws com.liferay.portal.kernel.exception.PortalException, 348 com.liferay.portal.kernel.exception.SystemException { 349 return getService() 350 .addUserWithWorkflow(companyId, autoPassword, password1, 351 password2, autoScreenName, screenName, emailAddress, facebookId, 352 openId, locale, firstName, middleName, lastName, prefixId, 353 suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, 354 groupIds, organizationIds, roleIds, userGroupIds, addresses, 355 emailAddresses, phones, websites, announcementsDelivers, sendEmail, 356 serviceContext); 357 } 358 359 /** 360 * Adds a user with workflow. 361 * 362 * <p> 363 * This method handles the creation and bookkeeping of the user including 364 * its resources, metadata, and internal data structures. It is not 365 * necessary to make subsequent calls to any methods to setup default 366 * groups, resources, etc. 367 * </p> 368 * 369 * @param companyId the primary key of the user's company 370 * @param autoPassword whether a password should be automatically generated 371 for the user 372 * @param password1 the user's password 373 * @param password2 the user's password confirmation 374 * @param autoScreenName whether a screen name should be automatically 375 generated for the user 376 * @param screenName the user's screen name 377 * @param emailAddress the user's email address 378 * @param facebookId the user's facebook ID 379 * @param openId the user's OpenID 380 * @param locale the user's locale 381 * @param firstName the user's first name 382 * @param middleName the user's middle name 383 * @param lastName the user's last name 384 * @param prefixId the user's name prefix ID 385 * @param suffixId the user's name suffix ID 386 * @param male whether the user is male 387 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 388 January) 389 * @param birthdayDay the user's birthday day 390 * @param birthdayYear the user's birthday year 391 * @param jobTitle the user's job title 392 * @param groupIds the primary keys of the user's groups 393 * @param organizationIds the primary keys of the user's organizations 394 * @param roleIds the primary keys of the roles this user possesses 395 * @param userGroupIds the primary keys of the user's user groups 396 * @param sendEmail whether to send the user an email notification about 397 their new account 398 * @param serviceContext the user's service context (optionally 399 <code>null</code>). Can set the universally unique identifier 400 (with the <code>uuid</code> attribute), asset category IDs, asset 401 tag names, and expando bridge attributes for the user. 402 * @return the new user 403 * @throws PortalException if the user's information was invalid, if the 404 creator did not have permission to add users, or if the email 405 address was reserved 406 * @throws SystemException if a system exception occurred 407 */ 408 public static com.liferay.portal.model.User addUserWithWorkflow( 409 long companyId, boolean autoPassword, java.lang.String password1, 410 java.lang.String password2, boolean autoScreenName, 411 java.lang.String screenName, java.lang.String emailAddress, 412 long facebookId, java.lang.String openId, java.util.Locale locale, 413 java.lang.String firstName, java.lang.String middleName, 414 java.lang.String lastName, int prefixId, int suffixId, boolean male, 415 int birthdayMonth, int birthdayDay, int birthdayYear, 416 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 417 long[] roleIds, long[] userGroupIds, boolean sendEmail, 418 com.liferay.portal.service.ServiceContext serviceContext) 419 throws com.liferay.portal.kernel.exception.PortalException, 420 com.liferay.portal.kernel.exception.SystemException { 421 return getService() 422 .addUserWithWorkflow(companyId, autoPassword, password1, 423 password2, autoScreenName, screenName, emailAddress, facebookId, 424 openId, locale, firstName, middleName, lastName, prefixId, 425 suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, 426 groupIds, organizationIds, roleIds, userGroupIds, sendEmail, 427 serviceContext); 428 } 429 430 /** 431 * Adds the users to the user group. 432 * 433 * @param userGroupId the primary key of the user group 434 * @param userIds the primary keys of the users 435 * @throws PortalException if a user group or user with the primary could 436 could not be found, or if the current user did not have 437 permission to assign group members 438 * @throws SystemException if a system exception occurred 439 */ 440 public static void addUserGroupUsers(long userGroupId, long[] userIds) 441 throws com.liferay.portal.kernel.exception.PortalException, 442 com.liferay.portal.kernel.exception.SystemException { 443 getService().addUserGroupUsers(userGroupId, userIds); 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 * Updates a user account that was automatically created when a guest user 686 * participated in an action (e.g. posting a comment) and only provided his 687 * name and email address. 688 * 689 * @param companyId the primary key of the user's company 690 * @param autoPassword whether a password should be automatically generated 691 for the user 692 * @param password1 the user's password 693 * @param password2 the user's password confirmation 694 * @param autoScreenName whether a screen name should be automatically 695 generated for the user 696 * @param screenName the user's screen name 697 * @param emailAddress the user's email address 698 * @param facebookId the user's facebook ID 699 * @param openId the user's OpenID 700 * @param locale the user's locale 701 * @param firstName the user's first name 702 * @param middleName the user's middle name 703 * @param lastName the user's last name 704 * @param prefixId the user's name prefix ID 705 * @param suffixId the user's name suffix ID 706 * @param male whether the user is male 707 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 708 January) 709 * @param birthdayDay the user's birthday day 710 * @param birthdayYear the user's birthday year 711 * @param jobTitle the user's job title 712 * @param updateUserInformation whether to update the user's information 713 * @param sendEmail whether to send the user an email notification about 714 their new account 715 * @param serviceContext the user's service context (optionally 716 <code>null</code>). Can set the expando bridge attributes for the 717 user. 718 * @return the user 719 * @throws PortalException if the user's information was invalid or if the 720 email address was reserved 721 * @throws SystemException if a system exception occurred 722 */ 723 public static com.liferay.portal.model.User updateIncompleteUser( 724 long companyId, boolean autoPassword, java.lang.String password1, 725 java.lang.String password2, boolean autoScreenName, 726 java.lang.String screenName, java.lang.String emailAddress, 727 long facebookId, java.lang.String openId, java.util.Locale locale, 728 java.lang.String firstName, java.lang.String middleName, 729 java.lang.String lastName, int prefixId, int suffixId, boolean male, 730 int birthdayMonth, int birthdayDay, int birthdayYear, 731 java.lang.String jobTitle, boolean updateUserInformation, 732 boolean sendEmail, 733 com.liferay.portal.service.ServiceContext serviceContext) 734 throws com.liferay.portal.kernel.exception.PortalException, 735 com.liferay.portal.kernel.exception.SystemException { 736 return getService() 737 .updateIncompleteUser(companyId, autoPassword, password1, 738 password2, autoScreenName, screenName, emailAddress, facebookId, 739 openId, locale, firstName, middleName, lastName, prefixId, 740 suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, 741 updateUserInformation, sendEmail, serviceContext); 742 } 743 744 /** 745 * Sets the users in the role, removing and adding users to the role as 746 * necessary. 747 * 748 * @param roleId the primary key of the role 749 * @param userIds the primary keys of the users 750 * @throws PortalException if the current user did not have permission to 751 assign role members 752 * @throws SystemException if a system exception occurred 753 */ 754 public static void setRoleUsers(long roleId, long[] userIds) 755 throws com.liferay.portal.kernel.exception.PortalException, 756 com.liferay.portal.kernel.exception.SystemException { 757 getService().setRoleUsers(roleId, userIds); 758 } 759 760 /** 761 * Sets the users in the user group, removing and adding users to the user 762 * group as necessary. 763 * 764 * @param userGroupId the primary key of the user group 765 * @param userIds the primary keys of the users 766 * @throws PortalException if the current user did not have permission to 767 assign group members 768 * @throws SystemException if a system exception occurred 769 */ 770 public static void setUserGroupUsers(long userGroupId, long[] userIds) 771 throws com.liferay.portal.kernel.exception.PortalException, 772 com.liferay.portal.kernel.exception.SystemException { 773 getService().setUserGroupUsers(userGroupId, userIds); 774 } 775 776 /** 777 * Removes the users from the group. 778 * 779 * @param groupId the primary key of the group 780 * @param userIds the primary keys of the users 781 * @throws PortalException if the current user did not have permission to 782 modify group assignments 783 * @throws SystemException if a system exception occurred 784 */ 785 public static void unsetGroupUsers(long groupId, long[] userIds, 786 com.liferay.portal.service.ServiceContext serviceContext) 787 throws com.liferay.portal.kernel.exception.PortalException, 788 com.liferay.portal.kernel.exception.SystemException { 789 getService().unsetGroupUsers(groupId, userIds, serviceContext); 790 } 791 792 /** 793 * Removes the users from the organization. 794 * 795 * @param organizationId the primary key of the organization 796 * @param userIds the primary keys of the users 797 * @throws PortalException if the current user did not have permission to 798 modify organization assignments 799 * @throws SystemException if a system exception occurred 800 */ 801 public static void unsetOrganizationUsers(long organizationId, 802 long[] userIds) 803 throws com.liferay.portal.kernel.exception.PortalException, 804 com.liferay.portal.kernel.exception.SystemException { 805 getService().unsetOrganizationUsers(organizationId, userIds); 806 } 807 808 /** 809 * Removes the users from the password policy. 810 * 811 * @param passwordPolicyId the primary key of the password policy 812 * @param userIds the primary keys of the users 813 * @throws PortalException if the current user did not have permission to 814 modify policy assignments 815 * @throws SystemException if a system exception occurred 816 */ 817 public static void unsetPasswordPolicyUsers(long passwordPolicyId, 818 long[] userIds) 819 throws com.liferay.portal.kernel.exception.PortalException, 820 com.liferay.portal.kernel.exception.SystemException { 821 getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds); 822 } 823 824 /** 825 * Removes the users from the role. 826 * 827 * @param roleId the primary key of the role 828 * @param userIds the primary keys of the users 829 * @throws PortalException if the current user did not have permission to 830 modify role assignments 831 * @throws SystemException if a system exception occurred 832 */ 833 public static void unsetRoleUsers(long roleId, long[] userIds) 834 throws com.liferay.portal.kernel.exception.PortalException, 835 com.liferay.portal.kernel.exception.SystemException { 836 getService().unsetRoleUsers(roleId, userIds); 837 } 838 839 /** 840 * Removes the users from the team. 841 * 842 * @param teamId the primary key of the team 843 * @param userIds the primary keys of the users 844 * @throws PortalException if the current user did not have permission to 845 modify team assignments 846 * @throws SystemException if a system exception occurred 847 */ 848 public static void unsetTeamUsers(long teamId, long[] userIds) 849 throws com.liferay.portal.kernel.exception.PortalException, 850 com.liferay.portal.kernel.exception.SystemException { 851 getService().unsetTeamUsers(teamId, userIds); 852 } 853 854 /** 855 * Removes the users from the user group. 856 * 857 * @param userGroupId the primary key of the user group 858 * @param userIds the primary keys of the users 859 * @throws PortalException if the current user did not have permission to 860 modify user group assignments 861 * @throws SystemException if a system exception occurred 862 */ 863 public static void unsetUserGroupUsers(long userGroupId, long[] userIds) 864 throws com.liferay.portal.kernel.exception.PortalException, 865 com.liferay.portal.kernel.exception.SystemException { 866 getService().unsetUserGroupUsers(userGroupId, userIds); 867 } 868 869 /** 870 * Updates the user's response to the terms of use agreement. 871 * 872 * @param userId the primary key of the user 873 * @param agreedToTermsOfUse whether the user has agree to the terms of use 874 * @return the user 875 * @throws PortalException if the current user did not have permission to 876 update the user's agreement to terms-of-use 877 * @throws SystemException if a system exception occurred 878 */ 879 public static com.liferay.portal.model.User updateAgreedToTermsOfUse( 880 long userId, boolean agreedToTermsOfUse) 881 throws com.liferay.portal.kernel.exception.PortalException, 882 com.liferay.portal.kernel.exception.SystemException { 883 return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse); 884 } 885 886 /** 887 * Updates the user's email address. 888 * 889 * @param userId the primary key of the user 890 * @param password the user's password 891 * @param emailAddress1 the user's new email address 892 * @param emailAddress2 the user's new email address confirmation 893 * @return the user 894 * @throws PortalException if a user with the primary key could not be found 895 or if the current user did not have permission to update the user 896 * @throws SystemException if a system exception occurred 897 */ 898 public static com.liferay.portal.model.User updateEmailAddress( 899 long userId, java.lang.String password, java.lang.String emailAddress1, 900 java.lang.String emailAddress2, 901 com.liferay.portal.service.ServiceContext serviceContext) 902 throws com.liferay.portal.kernel.exception.PortalException, 903 com.liferay.portal.kernel.exception.SystemException { 904 return getService() 905 .updateEmailAddress(userId, password, emailAddress1, 906 emailAddress2, 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 }