Yii-User: How to add user's image to profiles
Posted 11 January 2011 - 05:43 AM
Posted 11 January 2011 - 05:48 AM
Thank you for replying. I have implemented file uploading in Yii way. I wanted to know that does User module handles this. Since I have to add this field in Profiles table and User module automatically creates form controls, so how can I use Image in User module
Posted 12 January 2011 - 06:32 AM
Posted 12 January 2011 - 06:39 AM
Actually in my application, I have to save pictures of users as well. Since in yii-user module every information is saved in profile table and the forms (registration and profile modification) are generated dynamically, how can I implement the user image requirement :s
Posted 12 January 2011 - 07:18 AM
When you render the model, you just need, to include the full or relative path to the image and append the image filename, whatever its name is. This way, you can move your images wherever you wish to afterwards, and the only thing you need to change its path to the images on your code (global var ).
To change the forms and include the fileuploader, follow the instructions on the article I sent you and modify them to suit your upload needs.
Posted 06 November 2012 - 03:17 PM
It's on github:
Can't create link, just registered to reply to this thread.
first, thank you for sharing your work.
i am new to yii.. i have used ur extension to add a profile picture upload field to my form. The image is being uploaded and a thumb is created, but for some reason it is not being saved in the database.
Note: the related column in the db table is always empty.
Do you have an idea of what could be the problem?