hey @nichetorich
Yes you can make it this possible by using this hook filter.
rusac_fetch_registered_user_data
You can change the list ID in the user data variable.
For example.
add_filter("rusac_fetch_registered_user_data", "my_custom_function", 10, 2);
function my_custom_function($user_data, $user_id) {
if(user_id is job poster) { //place your conditions here.
$user_data['p[55]'] = 55;
}elseif(user_id is job seekers){
$user_data['p[68]'] = 68;
}
return $user_data;
}
Please do not forget to rate this plugin if you liked it. Thanks
Thank you! Where do I put this? I am working with my host to get it added and they asked where it should go.
This code should be in your functions.php
place your proper conditions in if and else if block and place this code in your active theme’s functions.php
Hi Pravin, Sorry to bother again, but I am getting this error when trying to add: Your PHP code changes were rolled back due to an error on line 988 of file wp-content/themes/oceanwp/functions.php. Please fix and try saving again.
syntax error, unexpected ‘is’ (T_STRING)
Here’s a link to an image showing how the code was placed:
https://twobraincoaching.com/wp-content/uploads/2020/01/Screenshot-2020-01-09-at-8.40.31-AM.png
You need to replace the condition here
user_id is job poster
To place this condition i’ll need to look into the database system and the website, that how this users are separated into job seeker and job poster.
If you don’t have coding knowledge please provide this to you developer.
Sorry, I am not fluent in php.
This is the line I am seeing that shows the IDs in the database:
{s:4:”read”;b:1;s:10:”edit_posts”;b:0;s:12:”delete_posts”;b:0;}}s:10:”job_seeker”;a:2:{s:4:”name”;s:10:”Job Seeker”;s:12:”capabilities”;a:5:{s:4:”read”;b:1;s:10:”create_job”;b:1;s:8:”edit_job”;b:1;s:10:”delete_job”;b:1;s:12:”upload_files”;b:1;}}s:10:”job_poster”;a:2:{s:4:”name”;s:10:”Job Poster”;s:12:”capabilities”;a:5:
So I need Job Poster and Job Seeker or job_poster and job_seeker.
I changed the code to be this (I also tried it as job_poster and job_seeker:
add_filter(“rusac_fetch_registered_user_data”, “my_custom_function”, 10, 2);
function my_custom_function($user_data, $user_id) {
if(user_id is Job Poster) {
$user_data[‘p[55]’] = 55;
}elseif(user_id is Job Seeker){
$user_data[‘p[68]’] = 68;
}
return $user_data;
}
and still getting the same error. If you can’t see what the issue is, I will loop in a developer.
Thank you for any help you can give
Hi @nichetorich
It will be better to pass this to your developer.