Gravityform registration add-on update user feed - wordpress

I'm using gravity form registration add-on to create users with a specific role X, I used a (create user) feed for this and assigned it to this role. Now I need the current user with role X to Update his role to Z, I going to create a form with (update user feed). The issue I face is, I don't want the user to be updated automatically, I need the same manual activation function exist in (create user feed)
so the sequence going to be after the user X submit the form I going to show him a confirmation message telling him to wait until we validate his request

Related

How to create a form where user gives details and also can check what he has entered on wordpress

I want to create a form on wordpress where the user will give the response and then the response is stored as csv , my problem is that i am using weforms and user are able to fill the form and response is stored also but i am not able to display the entries made by that user to himself so that he can change or view his entries later on also . I have made a website using buddy press where i need to take some data in the form so that the data is stored and the user can also check what he has entered and other members can also view his entries by going on his profile

I want to fetch submitted gravityform entries into another gravityform (wordpress)

Suppose I made form A and form B, I get a unique ID after submitting form A after that, another person opened form B and he entered just a unique ID given by me and enter additional information and submit it, then he might see the name and email ID that I entered in form A.
Please guide me to do this, also tell me if there is any form plugin or gravityform addon for this.
Now, in this case, I am trying to fetch submitted entries from form A to form B by using a unique ID that I created. (for unique ID I have a plugin so no worries about it)

Buddypress JSON API Plugin to show particular User activity

Im using Buddypress JSON Api plugin, wanted to know how single User Activity can be displayed.
The function which is provided by BP JSON API is activity_get_activities() which display all user's activity through out the website.But i wanted to display only for single user.
For Example: http://websiteurl/api/buddypressread/activity_get_activities/?userid=1
In the above example, if i pass userid=1 then all the activity by the user 1 will be displayed not by all other user's

Drupal how to have certain admins only see the users they've created

I use Drupal 7 and would prefer to do so but if I need to use Drupal 6 I will. I have a Drupal 7 site that I allow "advisors" to create authenticated users. I am an admin on the site so I see and can do everything. All that an "advisor" can do is create and edit authenticated users. Is there a way to make a view that displays the users that the particular advisor has created while the advisor is logged in?
If you don't understand what I'm saying let me put it this way. I am the admin of the site so I can do everything. I created a user role called advisor. There's also an authenticated role for users. Advisors can create authenticated users. So I have Advisor 1. Advisor 1 created 10 users. I also have Advisor 2. Advisor 2 created 3 users. I'd like a page (more than likely built with views - and I've used views before on other sites so I'm familiar with them) - I'd like a page that Advisor 1 could go to once logged in and it would display all of the 10 users that they created. Advisor 1 wouldn't see the users that Advisor 2 create.
Is this possible? Any help on this would be greatly appreciated. Thank you in advance.
I have implemented something similar and I can give you some guidelines.
First of all drupal 7 doesn't store the information of the creator of the users.
So, in order to track this you will need to attach a custom field to the user to keep this information.
In such case you ll have to make sure that every creator can insert only himself in this field and not anyone else or you 'll have to find an automated way to fill it in.
I suggest you use field permission module for setting permissions to this field (users probably should not even have view, creators should not be able to change it etc ) and computed field module for automatically populate the field (eg creator_field) upon creation for example with the uid of the creator.
Finally when creating the view you could add contextual filtering by using the logged in user on the creator_field.
You should also have a look at Organic Groups. I haven't use it but might be helpful
Hope it helps.
Updated
Add
global $user;
$entity_field[0]['value'] = $user -> uid;
to the Computed Code (PHP) in the computed field settings and store the value as integer in "Database store settings". Then in your view you should add a view of user with contextual filter of creator_field. In the contextual filter settings you must set "provide default value" -> "User ID from logged in user" in the "WHEN THE FILTER VALUE IS NOT IN THE URL" section.
This could be done relatively easily in Drupal 7 by adding a field to the user profile that points back to the user creator (using the Entity Reference module). Profile2 could offer a shortcut to making this field available on a profile, though if this is the only customization that you need to add to your profiles, it would be cleaner to do this in a custom module.
A view (Views module) could be configured to output a list of users with the current logged in user as the creator.
You'll also need to add similar logic for user_access to allow/restrict profile editing (if the current user is the user referenced in the profile). A permissions hook also could be useful if you plan to have different admin levels.
The Tokens module should work to insert this value for the new user, by inserting the current user into the field. Or you can do this before the user is saved. It would go a little something like this:
function mymodule_user_presave(&$edit, $account, $category) {
if ($account->is_new) {
global $user;
$created_by = $user->uid;
$edit['created_by'] = $created_by;
}
}
Good luck.

How to get the role of a user?

I have 2 roles in my drupal site. One is admin. The uid is 1. If I visit the profile of another user, say a user with uid 2, is it possible to get that value. I did not want to retrieve it from the url(user/2). Is there any other way to get a user information like uid, role etc while visiting profile of another user. I think $user can be used to get the details of current user only.
To get the details from user id when you are in the profile page of that user use the $account variable. More details in the user-profile.tpl.php template inside ROOT/modules/user.
Example, get user id: $account->uid;

Resources