Forums

Home » Liferay Portal » English » 3. Development »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Anand Abhyankar
How to upload image in Create Account / custom portlet ?
April 25, 2008 7:01 AM
Answer

Anand Abhyankar

Rank: Junior Member

Posts: 57

Join Date: March 26, 2008

Recent Posts

Hi,

I want to upload and save photograph of the person who is registering with the liferay through Create Account or some custom portlet.

Can anyone tell me how to do it ?

> Anand
Abhijit Y Gurav
RE: How to upload image in Create Account / custom portlet ?
April 28, 2008 9:29 AM
Answer

Abhijit Y Gurav

Rank: Regular Member

Posts: 155

Join Date: August 9, 2006

Recent Posts

Anand,

This is just one the way to achieve your solution,may be help or may not be

Currently Liferay is not having such facility to upload photo for User during account creation.You can create some custom portlet which consist of most of the fields from Admin User Creation Screen.
Add one more file tag for uploading the photo.

You can user service method from portal-service.jar ($LIFERAY_PATH/common/lib/ext/)

UserLocalServiceUtil.addUser(creatorUserId, companyId, autoPassword, password1, password2, autoScreenName, screenName, emailAddress, locale, firstName, middleName, lastName, prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, organizationId, locationId, sendEmail)


add one more table to database with blog datatype column, you can have userId as primary key.Store user photo in this table.During retrieval fetch data from both table using userId.

Regards,
Abhijit Gurav
Anand Abhyankar
RE: How to upload image in Create Account / custom portlet ?
May 15, 2009 11:29 PM
Answer

Anand Abhyankar

Rank: Junior Member

Posts: 57

Join Date: March 26, 2008

Recent Posts

Hi, I also want to add some attribute to the create account portlet.

I have tried the following link :-

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Custom+Attributes+and+JSP+Hooks#_36_messageScroll3108619

but using this link, I am unable to get the text box but getting the label for the new field.

Please find attachement....

Any ideas?


Thanks in advance

>> Anand
Attachment

Attachments: create_account_2.png (33.4k)