june01
Forum Replies Created
-
Yeah, I’ve tried this but same issue. They only can approve users when I give them the permission to manage users in whole network:
manage_network_usersHi, is there any update regarding this issue? The only way to make them able to approve users is to give them superadmin permissions. Only site admin is not enough. And I can’t do that. I only want them to access subscribers and not the whole network.
hi,
the code is not working for me, what I am doing wrong?add_filter( 'pods_shortcode_output', 'my_pods_shortcode_output' ); function my_pods_shortcode_output( $output, $tags, $pod, $context ) { if ( 'form' === $context ){ // check here if your user already has posts $id = get_current_user_id(); if ( $id ) { $params = array( 'where' => 't.post_author = "'.$id.'"', ); $pods = pods( 'ad_post', $params ); if($pods->total() == 0){ return $output; } else { //if not throw an error. return 'Error message or something else.'; } } } }- This reply was modified 4 years, 9 months ago by june01.
thanks a lot. using the
pre_save_pod_itemI was able to check if the user has published posts and prevent saving in case they have using this code below:add_filter('pods_api_pre_save_pod_item_ad_post', 'count_published_pods', 10, 2); function count_published_pods($pieces, $is_new_item) { $id = get_current_user_id(); if ( $id ) { $params = array( 'where' => 't.post_author = "'.$id.'"', ); $pods = pods( 'ad_post', $params ); if($pods->total() == 0){ return $pieces; } else { //if not throw an error. wp_die( 'You shall not pass!'); } } }But I couldn’t figure out how to use
pods_shortcode_output. My current code always displays a success message even when the pod is not saved. In the else statement, I would need something to replace it with an error message.Only one user is assigned the role User Manager. but I’ll probably will need more.
This is the link to the screenshots.I want to check if the user has already published a post. If that’s the case then an error message should be displayed. Or the form should be blocked with some message at the top indicating that they cannot publish more than one post.
I think I can figure out how to query the database and see how many published posts the current user has, but I don’t know how to display error messages and where to put the code.
I want to approve users using the member directory in front end.
Thanks. Can I also display custom error messages? I want to add some more logic into it but I would need to display error messages in frontend for the user to see in case of failure.
or maybe block the form when a specific condition is not met.I’ve created a new user role called User Manager. This user should be able to manage subscribers only which includes approve/reject/delete/edit and view. I’ve set all required permissions in UM User Role settings but still not working. I can’t manage the users and view them.
Can you point me to any link that shows how to implement the conditional fields?
Yes, it uses ajax for form submit.
Updated the code, now I am getting this message on form submit:
“Your account was updated successfully.”But the post is still not submitted.
This is the link
the plugin for the post submit form is WP User Frontend
When I click on submit, this error appears.
Never mind, it’s working. I had a problem with my form which was causing the issue.
Forum: Plugins
In reply to: [Post My CF7 Form] Save post as pendingThanks it’s working