I need to display name, role, photo of current user.
I'm use views, in Advanced settings add Contextual filters select Content: Author uid and in settings of it select Provide default value ,in type selectbox choose User ID from logged in user.
But in fields i haven't field 'user:name'.
If i create relationship content : author , user name will be displayed, but only for users, that published node.
At the end, i want see like this
Hello, SmithJN
Role: Authorised user
Photo: [photo]
When you create the view, at the very first screen, you have the option to select the entity type on which you want to create the view. (thank J.Reynolds)
Then in Fields add Field Name, Role, Image In Fileter Criteria add filter User : current
It's all !
Related
I have a form with a User Picker field, simple. On my table I want to display the associated name of the user from my directory, not their e-mail address like the default is. Suggestions?
Thanks!
As per the official documentation, the onValueChange event will pass an object in the newValue. This object is the user record in the directory. From there you can get the full name by using this:
var fullName = newValue.FullName;
For that to work, in the property editor you have to enable the valueIsRecord option, while the user picker widget is selected.
I've created a custom module and related it to vtiger organizations module. The custom module has an uitype10 attribute to link the record to the organization.
Everything works except that the organization name field in the quick create form of my related module is not automatically filled in. What I mean is:
if I go to organizations list, click an organization, click on Contacts icon and then click on the add button to add a new contact from the organization panel, the quick create form shows the organizazion name already filled in with the organization name I currently am in.
if I go to organizations list, click an organization, click on my custom module icon and then click on the add button to add a new record from the organization panel, the quick create form shows the organization name as empty. I have to manually write the organization name in it.
What I need is that my module behaves like the contacts module, so when I add a new record from the organization panel, the field for organization name should already filled in.
Any idea on how to achieve this?
Vtiger store Relation between 2 modules in vtiger_relatedlists table and based on details in this table Create Button URL will get generated in function getCreateViewUrl() in RelationListView.php. You can get core file in modules/Vtiger/models/RelationListView.php.
Solution : Table crestel_relatedlists will have relationfieldid which store the fieldid of your organization module against relation with your module. If relationfieldid is set to "0" then you have to set it with exact fieldid which you can get from vtiger_field table.
I want to hide superuser's (admin role) from the user's list.
Currently, any user can find a root user with the search. I also have a view "list of members" where root appears. I would like to find a solution ...
I tried the "User One" module but nothing changes. I work on Drupal 8.
Thanks,
Nemtecl
In drupal 8 all lists are views. So if you want to hide the user with the id 1, you have to edit the view and set a filter.
Go to URL/admin/structure/views and choose the correct view and click on edit.
Now add a filter criteria and choose "User Id" and set the filter to User id NOT equals 1
Just Create a view of users and in FILTER CRITERIA add a filter for (Roles User Roles that a user belongs to.) and add a Operator Is none of and select the role from Options.
in my drupal 7 I have 2 content-types like these:
ContentA
ContentB (with a field Entity Reference to ContentA)
In the front-end detail page of ContentA, I would love to show a block/view with a list of ContentB whose Entity Reference field is set to the current ContentA.
I made a view of type Block and added it correctly to the page, but I cannot filter ContentB based on the current ContentA.
Could you help me?
Thanks
You should add a contextual filter for the value you will use for filtering to the block View of ContentB.
Then in your contextual filter in the "When the filter value is NOT in the URL" area select "Provide default value" and Type "PHP code" (You should have enable php filter for this). In your php code area you should have the following code
$node=menu_get_object();
return $node->field_your_machine_field_name['und'][0]['target_id']; // this is the field you will use for fitlering
Hope it helps
UPDATE
The above code will work if you need to show in your block similar results with the same selection (for example similar results of ContentB with the same selection in the referencing field of ContentA ).I will not delete because you might need it also in your project.I misunderstood. Actually the solution is simpler. You should add the contextual filter to the field and in "When the filter value is NOT in the URL" area select "Provide default value" and "Provide id from url"
I want to notify the administrator when the user change his profile (for example, change his pseudo, his avatar and other custom fields attached to the user(People > Account settings > Add a new field) )
Thanks in advance !
I think the perfect module for this would be rules . There is a lot of docu on the project page.
Event:
Create a new rule on event user update
Condition
add condition (check for modifications..)
Result
trigger email