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