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