mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Updating user email when activating premium.
This commit is contained in:
parent
d35a109e08
commit
49433e1f58
1 changed files with 3 additions and 0 deletions
|
@ -178,6 +178,9 @@ post_save.connect(create_profile, sender=User)
|
|||
def paypal_signup(sender, **kwargs):
|
||||
ipn_obj = sender
|
||||
user = User.objects.get(username=ipn_obj.custom)
|
||||
if not user.email:
|
||||
user.email = ipn_obj.payer_email
|
||||
user.save()
|
||||
user.profile.activate_premium()
|
||||
subscription_signup.connect(paypal_signup)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue