I have user the user name as 'USER1' to login to BI publisher.is it possible to display my user name like 'USER1' in prompt level or in layout level.i know we have to use 'xdo_user_name' but can any one explain how to use it.please help me thanks
This works for me on an RTF template in BIP.
Put this somewhere in the beginning in your template
<?param#begin:XDO_USER_NAME;'Error'?>
And then wherever you need to print the username, put:
<?$XDO_USER_NAME?>
For me, this prints my BIP username in the output.
Related
I have two issues. Email verification works well, but I want to customize the email sent to users. Here is the content of the email:
Hello from Localhost!
You're receiving this e-mail because user test has given yours as an
e-mail address to connect their account.
To confirm this is correct, go to
http://127.0.0.1:8000/rest-auth/registration/account-confirm-email/MTE:1h4DCn:JtkrZ1wkENQIdG8ysIVu7Qx_R44/
Thank you from Localhost! https://localhost:8000/
How can I create an html file and fill in the content that I want to be sent in the email? And how about the email subject?
The second issue, is that when I click on the link, the user gets verrified, but then I get a 404 error on /accounts/profile.
Here is my code:
from allauth.account.views import confirm_email
urlpatterns = [
path('accounts/', include('allauth.urls')),
path('rest-auth/', include('rest_auth.urls')),
url(r'^rest-auth/registration/account-confirm-email/(?P<key>[-:\w]+)/$', confirm_email),
path('rest-auth/registration/', include('rest_auth.registration.urls')),
]
Do I have to add a url for accounts/profile/ and create an html template showing that the email verification was successful? Also, is there a way to change to url to i.e accounts/verification-success/?
Custom e-mail
You can find the default e-mail templates used here: https://github.com/pennersr/django-allauth/tree/master/allauth/templates/account/email
Subject: email_confirmation_subject.txt
Text e-mail: email_confirmation_message.txt
You can override them in your Django app like any other template.
To activate HTML, you just have to add your own file with the name email_confirmation_message.html.
You can also have different messages when you signup or just confirm an e-mail address.
You can have a look into the code to understand how it works.
accounts/profile/
When you end up here you have successfully logged in. However, you will need to implement a view for this URL yourself, as whatever is to be displayed here is project specific. You can also decide to redirect elsewhere:
https://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url
From https://django-allauth.readthedocs.io/en/latest/faq.html#when-i-attempt-to-login-i-run-into-a-404-on-accounts-profile
Since you have to implement the profile yourself, you can use accounts/verification-success/, too.
So I've been getting a bothersome someone who keeps using my nickname. What I want to be able to do is perform the following command every time someone with exactly my nickname (let's say UserName) joins the channel I currently reside in:
/msg NickServ ghost UserName n0ideaHwatPassIs?
n0ideaHwatPassIs? is a sample password for our sample registered user of UserName
This sort of script would have to be able to check (in more or less real-time) if a separate user changed his/her nick to said UserName as well. If someone would be so kind as to help me with my dilemma by either pointing me to the proper documentation or working out such a script (no idea if this is as cut-and-dry as I imagined it would be at first) for me?
you can use a on notify event
but first, you have to put that nickname on notify list
type
/notify nickname
then use this script, press alt+r click on file, then new and put this script in there
on *:notify:{
if ($nick != $me) && ($nick == Nickyouwanthere) {
msg NickServ ghost UserName n0ideaHwatPassIs
}
every time someone with exactly my nickname (let's say UserName) joins the channel I currently reside in
This can't happen on IRC. (Except in exceptional circumstances like netsplits, but is immediately resolved then (by dropping one or both parties))
I need to get hold of a user's profile image. Can't seem to find anything that points me in the right direction. And also, how can I get the full name of the user (not the username)?
Thanks!
If the full name is available, it'll be in the displayName property of the user. User images are not provided by CocoaLibSpotify.
I have found in sfDoctrineApplyPlugin a template called applyAfter.php
that shows a message like "You have registered ok..." after the users apply for an account. It is called from the sfApply/apply action this way: "return 'After';" when the apply form is valid.
What kind of template is that? I never saw that way (return 'After';) of calling a template. Can someone give me info about that?
Second question: I show a layout with a language select when the the
apply form is printed. I wouldn't like to show that language select in
the page that shows the message "You have registered ok...". As the action
is the same in the both pages (sfApply/apply), what should i do to hide
the language select in the verification page?
Javi
The function returns the string 'After' to the caller. The caller always seems to be as follows: $this->widgetSchema->setNameFormat('sfApplyResetRequest[%s]');
So, the string 'After' is being used in conjunction with the setNameFormat function (which is part of the symfony libraries). All it is doing, is setting the 'name' attribute for the form. More information on this function here.
For your second question, you could simply add an IF statement, to check to see if the current route is the one that you do not want to display the language select on. If it isn't, then display the language select.
You can verify the current route with the following code:
sfContext::getInstance()->getRouting()->getCurrentRouteName();
I have an email template that I would like to launch from within the case using a Link/Button. I see the option under setup->customize->cases->button and links I even see where I need to place the URL. What I don't see is nay documentation on how to build the URL to launch an email template. Any help you be great
I don't know if this is documented anywhere by salesforce, but I found from some guess work:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn
Just use that as the url content of a custom button or link. This one is for cases, as you are trying to do, but I think this should work for other types of objects as well.
The parameters are p3_lkid, which is the case id, p2_lkid which is the id of the contact you are emailing, and template_id which is hardcoded to the desired email template. (You can find this id by looking in the url of the Setup page for the template)
This was really helpful. I did, however, figure out another way to do it. Click on the "Send an Email" button you currently have. Copy the URL and add &template_id=YOUR TEMPLATE ID.
There is one other ID number that will show up in the original URL. Change that to be the dynamic field you want it to be.
For example:
Copy url from "Send Email": https://na3.salesforce.com/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1
Add &template_id=YOUR TEMPLATE ID so it looks like this:
/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1&template_id=YOUR TEMPLATE ID
Remove the other id (it's the object you used to send the email - so in this case, I was wanting to be able to send an email directly from a Campaign) and replace with the dynamic field:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Campaign.Id}&retURL=%2F70150000000Axih&template_id=YOUR TEMPLATE ID
And voila! It should work!
Abeyer's answer is good. However, if the template contains solution attachments "{!Case.Solution_Attachments}" the attachments will not get included unless you add the new_template=1 parameter to the URL making it:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn&new_template=1