upload files to specific user - file

I want to let admin upload files (PDF files) to a separate user (client), such as bill, information and documentation.
I think to Add new content type with some fields, like file field, but I don't know how to add users list, so admin can choose file to upload and corresponding user.
After I finish this step, how can I display these files to user when login?

To reference the user, you could install the entity reference module.
http://drupal.org/project/entityreference
You can use that to add a field that will reference users.
As far as listing files for the user, you can use Views to make a list of your new content type, and filter it by the user who is logged in.
To elaborate more, Install the Views module, and make a new View, with a content-type filter for your new type, and a contextual filter for current User, and then add a Field for the file field, and configure the field however you would like the file to be displayed to the user.
Depending on what you want, you could also set that view as the frontpage of your site, so that people will see it when they log in.
To filter by current user, when you add the Contextual Filter, in the "WHEN THE FILTER VALUE IS NOT IN THE URL" section, select "Provide Default Value" and then select the type "User ID from logged in user"

Related

How to write a complex reference to objects in email templates for Salesforce

I need to create a reference in an email template. for that I need to reffer a standard Contact objecect. For that I have a Custom Object Email Info, that has a lokup to standard Accounts.
So in the email I have to have value of the custom field Email_info__c from the custom object Email_info__c(the object and it's field have the same API names) while entering the Contact.
In the end both Contacts and my custom object have the lookups to Account, but not to each other, and there is no lookup from Acount, for now.
My first guess was to refer to the first child object Email info in the header of the VF template
relatedToType="Email_Info__c"
and then refer to it in the body as
{!RelatedTo.Account_r}
but then I would need a lookup from Accounts to Email Info to be able to refer deeper
{!RelatedTo.Account_r.Email_Info__r.Email_Info__c}
but, I don't think that it'll work that way or that it meets the needed criteria. Can someone share if there is an option at all to get the Email Info to Contacts through Accounts without creating a lookup on Accounts?
The task is to have a middle referred object, not a direct lookup:
It depends a bit how you are going to use this email template. What will the send be triggered from. Account? Contact? Email Info record? Will it be fired from a workflow or user will be instructed to navigate to account record and start composing the message?
If your relatedTo is really Email_Info__c then you don't have to do anything, you have all the data hidden in {!relatedTo.Id}, {!relatedTo.Name}, {!relatedTo.Email_Info__c} (you said the field name is same as object's name)
If your email starts from "Account" and you can guarantee accounts will have 1 email info record on related list - something like this might work:
<messaging:emailTemplate subject="hi stack" recipientType="Contact" relatedToType="Account">
<messaging:plainTextEmailBody >
{!relatedTo.Opportunities[0].Id} {!relatedTo.Opportunities[0].Name} {!relatedTo.Opportunities[0].StageName} {!relatedTo.Opportunities[0].CloseDate}
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
from Account (relatedTo) I'm going down to the related list of Opportunities, I'm picking 1st one (at random... but if you have just 1 record it'll be fine) and display whatever I want.
If your relatedTo and recipient both have to be Contact it starts to get bit messier, normal visualforce syntax will not allow you to go "up" (from Contact to Account) and then "down" (from Account to related list of email infos)
You'd need to start with something like https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_email_templates_with_apex.htm and then figure out how to pass the Id of account to it and run a query for email infos related to this account. https://salesforce.stackexchange.com/questions/245930/pass-id-from-visualforce-email-template-to-controller might be a good start, poke me if you're stuck.

How to get object ID value from Azure AD B2C user profile edit process

I am developing an Azure AD B2C custom policy. Due to some requirements,I need to get the value of user object ID on edit profile process to call some third-party APIs. However, I can't letting this value show up on edit profile,even though I have added object id as a member of OutputClaims in AAD-UserReadUsingEmailAddress in Base.xml.
So my question is if it possible that show a user's object id value on edit profile page? If not, is there any workaround for this requirement?
Thanks in advance.
Edit Profile page only displays user editable attributes. Object ID is a attribute that user can't edit, so it can't be displayed on this page even though you have added it in OutputClaims . So if you just want to get its value on Profile Edit Page, you could define a custom attribute to copy this value and display this custom attribute on Profile Edit page.
If you would like to do so, there would be 2 steps:
Add a step for new user register process: copy user's object value to a custom attribute.
For exist users, you should run some scripts to copy user's object value to a custom attribute.

Iframe content not able to save in module params Joomla

I am using Joomla3 with tinymce editor. I have created one module and adding one params in textarea
I am adding iframe code
in text area
but it's not saving. If i am save normal text string then it's saving
Please help me
I believe you need to add a filter to your xml code.
such as:
filter="RAW" or, probably more appropriately, filter="HTML"
This will keep Joomla from cleaning your code. There are a number of filters available to XML fields when creating modules. You can examine the code here: https://github.com/joomla/joomla-cms/blob/master/libraries/joomla/filter/input.php#L167 to see the exact list.
What user group is the account you are using a member of? Super Users and Administrator group types should have no filtering set by default but it sounds like you might need to edit those settings.
From the main menu:
System > Global Configuration > Text Filters (tab)
You will see all the available user groups for you website. The group your user belongs to should have a Filter Type of No Filtering. Another important note is its better to add the user account to a group with the permissions then to arbitrarily adding it to a group type typically reserved for registrants, guests or low-level editing.

Drupal 7 displaying different user content

I have searched and searched and cannot find a solution to my specific problem...
I have a site that users join, and can upload their own videos. I crated a specific video type to handle this upload.
Other users can log in and see this content, they get to the content by clicking on a "profile" link for a specific user, and then it should display all the videos that user uploaded. Currently all I can get to work is display ALL of that content type, or none... I cannot figure out how to just get the user being looked for.
In my URL i have the user name being sent, because other info on the profile page that loads is driven off of that ( looked up in mysql tables and displayed with PHP).
As I mentioned I have a filter that limits to playervideo ( which is my content type) and that works, but as mentioned it displays all not just the user I am looking for.
any help would be much appreciated!!
thanks
I think your question is "How do I make a page for all users that lists content authored by a specific user"
I'd do this with the Views module.
Add a view for all your nodes.
Then add a "relationship" for "Content: Author".
Now add a "contextual filter" for the field "user: uid" with a default argument the userid from the URL.
Or you could try to add a contextual filter of "Content: User posted or commented" with the default value as the UID from the URL.
Cheers!

how to customize useraccount dropdownlist in dnn6

In dnn6 Would you please go to admin->user accounts and look at the dropdown selector? It shows you can search by username, email, etc but not by first name or last name. Do you know how this dropdown gets poplulated so we can change it?
I don't know why yours wouldn't be populating those fields, I didn't add them to mine, they were already there.
The Population of the dropdown occurs in the \desktopmodules\Admin\Security\Users.ascx.cs file
ProfilePropertyDefinitionCollection profileProperties = ProfileController.GetPropertyDefinitionsByPortal(PortalId, false, false);
So I would start by looking at your Profile Properties defined at the portal level, see if you have First/Last name there. You can find profile properties from the Admin/Site Settings page, on the Users Account Settings tab (under the profile settings section)
If you are using DNN6 (not DNN7) then you'll go to the Admin/User Accounts page and go to the actions for the user accounts module and find the User Profile Properties area.

Resources