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