Is there a way to make profile picture upload as mandatory (requiered field) when editing Profile?
No the user is registered and the hook is used inside the component to execute once its added. If you getting same error can you share your website URL just for us to take a look into the XHR request whether it is actually sending picture or not.
Yes Image upload is working without problems after login, maybe the error is because there is no profile existing while registration.
Do you able to upload images in wall post after login? if so its not the hosting provider. If can't upload wall post photo also then ask your hosting provider to enable PHP GD extension for your account.
What engine u are using to check the uploadet file? Maybe my hosting provider is not supporting that.
I´m using OSSN premium 6.1
It also works not without Anonymous Registration, i´ll try with some more disabled components
It works fine for me with Anonymous user registration you need to make sure you are using OSSN 6.x I guess you are using OSSN 5.6 ?
If 6kB are small, yes.
Did you tried to upload very small file to see if it is not size issue?
The component you created is working great together with anonymous registration component, but it cant regognize the jpg file i try to upload:
Sorry I missed that part. I actually published such a component that I talked https://www.opensource-socialnetwork.org/component/view/5484/signup-profile-picture
In your case it requires you may use following code that
As the hooks run before action happened so it won't send request for join. You an add following in your component file.
I HAVE VERIFIED IT BUT YOU CAN HAVE A BASIC UNDERSTANDING YOU MAY ADJUST CONDTIONS BELOW
function group_join_notice_init(){
ossn_register_callback('action', 'load', 'group_join_user_validate');
}
function group_join_user_validate($callback, $type, $params){
if(isset($params['action']) && $params['action'] == 'group/join'){
$user = ossn_loggedin_user();
if($user){
if( !isset($user->icon_guid) || (isset($user->icon_guid) && empty($user->icon_guid)) || !isset($user->category) || (isset($user->category) && empty($user->category)) ){
ossn_trigger_message("You need to add your profile photo and select a user category on profile edit page before joining the group!", "error");
redirect(REF);
}
}
}
}
ossn_register_callback('ossn', 'init', 'group_join_notice_init');
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)