activation

Django-Registration Activation redirect with django.contrib.messages

旧巷老猫 提交于 2019-12-01 09:24:24
问题 I'm trying to set up my django-registration activation workflow so that when the user hits the activation link it redirects them to the login page with a nice little message using the django messages framework django.contrib.messages Right now, I've managed to send the user back to the homepage using the success_url parameter: url(r'activate/(?P<activation_key>\w+)/$', activate, {'backend': 'registration.backends.default.DefaultBackend', 'success_url':'/'}, name='registration_activate', ),

Best practices for email confirmation codes

喜你入骨 提交于 2019-11-30 12:45:28
问题 I'm creating a PHP website which involves users signing up, and I'm wondering about best practices for "email confirmation" codes. New users must confirm their email addresses - I do this by generating a code and sending it to the user in an email, which he can then use to activate his account. Rather than storing this key in a database, I'm using a handy little workaround: the code is the result of: md5("xxxxxxxxx".$username."xxxxxxxxxxx".$timestamp."xxxxxxxxx"); Where $timestamp refers to

Activation of maven profile based on multiple properties

三世轮回 提交于 2019-11-30 08:00:00
I am creating a maven 2 build for a project and I came up with profiles since the build has to be created for both different locations (say Berlin, Paris, North Pole) and different environment (Development, Production). Those are specified via properties. So for "North Pole" "DEV" I do: -Dlocation=NorthPole -Denvironment=DEV Now I would like to acivate my porfile based on both these properties, not just one. So I tried following: <profiles> <profile> <id>NOrth Pole DEV</id> <activation> <property> <name>location</name> <value>NorthPole</value> </property> <property> <name>environment</name>

Best practices for email confirmation codes

这一生的挚爱 提交于 2019-11-30 03:57:52
I'm creating a PHP website which involves users signing up, and I'm wondering about best practices for "email confirmation" codes. New users must confirm their email addresses - I do this by generating a code and sending it to the user in an email, which he can then use to activate his account. Rather than storing this key in a database, I'm using a handy little workaround: the code is the result of: md5("xxxxxxxxx".$username."xxxxxxxxxxx".$timestamp."xxxxxxxxx"); Where $timestamp refers to the user-creation time. On the whole I was quite pleased with this, but then I got to thinking, is this

Activation of maven profile based on multiple properties

ε祈祈猫儿з 提交于 2019-11-29 10:55:06
问题 I am creating a maven 2 build for a project and I came up with profiles since the build has to be created for both different locations (say Berlin, Paris, North Pole) and different environment (Development, Production). Those are specified via properties. So for "North Pole" "DEV" I do: -Dlocation=NorthPole -Denvironment=DEV Now I would like to acivate my porfile based on both these properties, not just one. So I tried following: <profiles> <profile> <id>NOrth Pole DEV</id> <activation>

validation link via email

ε祈祈猫儿з 提交于 2019-11-28 22:06:16
When a user subscribes to my newsletter via their email address, using php, how would I send them an 'Activation Link' via email to confirm it is their email address and not a fake one. so at the moment I have PHP: <?php $to = "recipient@example.com"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; if (mail($to, $subject, $body)) { echo "<p>Message successfully sent!</p>"; } else { echo "<p>Message delivery failed...</p>"; } ?> I guess i would change the $body to this: $body = "Please click the link to activate your email \n http://www.activationlink.com?"; How would I make it so that if a

validation link via email

风流意气都作罢 提交于 2019-11-27 14:12:43
问题 When a user subscribes to my newsletter via their email address, using php, how would I send them an 'Activation Link' via email to confirm it is their email address and not a fake one. so at the moment I have PHP: <?php $to = "recipient@example.com"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; if (mail($to, $subject, $body)) { echo "<p>Message successfully sent!</p>"; } else { echo "<p>Message delivery failed...</p>"; } ?> I guess i would change the $body to this: $body = "Please click

How to display notice in admin panel on Plugin Activation?

寵の児 提交于 2019-11-27 11:58:58
I am trying to display a notice in admin panel when I activate my test plugin. How can I display that? What's that method? kitchin For plugin activations, the 'admin_notices' hook cannot be used directly, because there is a redirect. A workaround is to store your notice in the options table and check for it next time. Also, if you also want to cover plugin upgrades as well as activations, you will need to use another hook, such as 'admin_init' (since WP 3.1, see http://make.wordpress.org/core/2010/10/27/plugin-activation-hooks/ ). Here is a complete sample plugin handling both activation and

Why can't I activate a Maven2 profile from another profile?

让人想犯罪 __ 提交于 2019-11-27 01:58:39
I have a multimodule Maven2 project which builds a web application. The application is connected to a backend server and a DB. There are several server instances deployed in our environment, and there are also multiple backend and DB instances for development, UAT, production, etc. So practically, each application configuration needs these 3 coordinates: front-end server back-end server DB I am working on unifying and automating the application configuration. It is easy and obvious to represent these different configurations as profiles in Maven. Then I can create a specific configuration by

How to display notice in admin panel on Plugin Activation?

不问归期 提交于 2019-11-26 18:07:24
问题 I am trying to display a notice in admin panel when I activate my test plugin. How can I display that? What's that method? 回答1: For plugin activations, the 'admin_notices' hook cannot be used directly, because there is a redirect. A workaround is to store your notice in the options table and check for it next time. Also, if you also want to cover plugin upgrades as well as activations, you will need to use another hook, such as 'admin_init' (since WP 3.1, see http://make.wordpress.org/core