payplan jomsocial auto login and new user activation - joomla2.5

I am using the payplan and jomsocial for new user registration.
What i need is that new user should automatically logged in after subscription.
I'm using autologin and activate after payment apps and every thing is working fine except new user is not activated after paypal payment.
The user is auto logged even it is not activated.
I have set New user registration setting to 'None'. So user must be activated automatically.
Please help me to solve this issue.
Thanks in advance.

Payplans activate after payment app does not activate user automatically.
It just send activation email after payment and user need to click on the activation link send in the email to activate his account.
If you want to activate user account automatically then you should use Quick Registration app for this purpose.
In this app there is an option to activate user account on subscription activation.

Related

Apex Change Password option for end users

I have created an apex application and I have some end users which should log in to the application and use it, I realized that there is not any change password or reset password option for end users !!!
How can I add it to login page ??
I have done that based on this link, but the problem is when any username is not entered, it goes to the change password page and after presseing the change password button an internal error box appears !
https://apex-de.blogspot.com/2017/11/change-apexuser-password-for-end-users.html
That page in the blog does not mention a username. And it shouldn't because a user should only be able to set/change a password for himself. Usually there are 2 ways to change a password, both can be implemented together:
A form that is accessible to any user that is logged in. That way you're sure that the password is changed for the actual user.
A link on the home page that points to a public form in which the user can enter his email address that is linked to his account. When the form is submitted the user gets an email with a link that contains a unique code that is linked to his email and only valid for x minutes. The email verification is needed to ensure the user that wants to change the password is who he says he is. Clicking on the link allows the user change the password. At no point the password is displayed to the user or emailed to the user.
Both of those can be implemented in apex - the api to change a users password is APEX_UTIL.CHANGE_CURRENT_USER_PW as mentioned in the blog.
The reason that by default there is no password management is that the authentication scheme "Application Express users" is rarely used for production applications. Usually it's social sign in, LDAP, SSO or SAML and "Application Express users" is only there for development purposes.

How to enable new user by default in Joomla

Good morning. I am using Joomla 2.5 user registration form for user registration .when a new user created their new account the activation link will go to their registered mail id .but the problem is when i see the newly registered user information in admin back end the new user is not Enabled . he is became Enabled after self activation only. How to make Enable new user by default after successful account creation . please give me some hint
thanks in advance .
just follow these step and you`ll done that you want.
1. Login to admin panel
2. Go to user manager
3. now select option for user manager
4. here is option for new user account activation
there are three option
first is "none" means the newly user registered activate automatically
second is "self" means newly user registered activate his/her account by itself
and
third one is "admin" means admin activate newly user registered account
You follow this step and set it to None.
DEMO IMAGE

Django: allauth facebook

I have a login button in my site, which opens facebook login in new window, ask user to login fetch neccesary informations and immediately logout that user and close that temporary window. Problems comes when next user again click login button new window open and it doesn't ask for login informations it by default assumes that previous user has already logged in...How do I override these facebook logins for different users?
Facebook has support for re-authentication: https://developers.facebook.com/docs/howtos/login/client-side-re-auth/
This forces the user to re-enter his password. However, at this point the user cannot decide to login as a different user.
Support for re-authentication has just been added to the master development branch of django-allauth:
https://github.com/pennersr/django-allauth/commit/8a8f9902b4c7a1f5d079d1422be2976b51e5b7b9
If you prefer to use 0.9.0 (which does not contain support for this yet) you can easily override the "facebook/fbconnect.html" template and pass along the auth_type parameter to the FB.login API call yourself.

How does allauth work when user logs in via social registration

I have been trying to use django-allauth to provide Social registration, but I am having trouble configuring the profiles for the user. There is no documentation of django-allauth which tells
how a django user account is created when a user logs in via a third party such as facebook
What username is assigned to that user and what password is used.
Certain third party providers such as Facebook provide a lot of information about the user such as their name, email etc. so how can we get them and save in the user account/profile
If anybody has used allauth in their projects and can provide some details then it would be really helpful.
I am using django_allauth in my project.
(1) How a django user account is created when a user logs in via a third party such as facebook ?
You should take a look at :
your admin panel and see what happens when somebody logs in.
allauth.facebook.views.login and try to track the login process
It is something like this (in a few words):
When a user logs in your site via his Facebook credentials he is given an access token
This token is saved in the FACEBOOK_ACCESS_TOKENS table (you can see it in the admin panel)
With this access token and with the help of Facebook GraphApi we know his social_id
When we know his social_id - we can have his Facebook account from our database
If we haven't saved it in the db already - we save the Facebook account in the FACEBOOK_ACCOUNTS table (Facebook Accounts in the admin panel)
Then we create a user in the USERS table with the data present in the Facebook account. (you can see the new user in the Users section in the admin panel)
(2) What username is assigned to that user and what password is used ?
As I mentioned before with the help of Facebook GraphApi we get the username of the Facebook user and it is assigned to the User profile as User.username
(3) Certain third party providers such as Facebook provide a lot of information about the user such as their name, email etc. so how can we get them and save in the user account/profile?
Again - the Facebook GraphApi - it gets you the info you need.
I have integrated django_allauth in my site and it is working properly. I will be happy to answer(if I can) if you have more questions.
EDIT - For the avatar support...
I think you have to take a look at the django_allauth settings and particularly in:
SOCIALACCOUNT_AVATAR_SUPPORT (= 'avatar' in settings.INSTALLED_APPS)
Enable support for django-avatar. When enabled, the profile image of
the user is copied locally into django-avatar at signup.

django-registration with paypal integration

I'm trying to figure out how to integrate django-registration with django-paypal. Being a Django n00b, I'm trying to figure out how to implement a flow like this:
User signs up using django-registation with 'active' flag set to 0
After registering, send user to PayPal for a subscription
When they come back from PayPal successfully, I want to set 'active' to 1
I've been looking at the django-registration documentation and don't quite understand how to use different backends or implement a flow the way I want.
Any tips on how to accomplish this would be greatly appreciated. django-paypal won't be a problem for me as I've done PayPal integration before (in PHP for a self-published book about CakePHP).
To have registration not send an email you pass send_email=False to the RegistrationManager.create_inactive_user call in your view to register a user. After you create the user, you probably want to create a landing page with the paypal buttons for payment. Instruct the user to click a payment button to pay. Generally I send the user.id in the custom field for the payment button.
Then, in django-paypal, use the IPN signal handlers to activate the user based on the user.id in the custom field of the IPN query. You might want to send a modified registration email at this point, welcoming the user to your site and telling them you have received payment and have activated their account, but those are details for you to define.