[Skip to main content](#vessel-content)

#   AutoLogin

##

- **[tgdkere2](/forum/user/8136-tgdkere2 "View tgdkere2's Profile")**
- [![tgdkere2's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8136-tgdkere2 "View tgdkere2's Profile") Topic Author
- [ Offline](/forum/user/8136-tgdkere2)

Less More

- Posts: 82
- Thank you received: 5
-
-

13 years 2 weeks ago [\#132158](#132158) by [tgdkere2](/forum/user/8136-tgdkere2 "View tgdkere2's Profile")  *[AutoLogin](/forum/33-customers/863573-autologin#132158 "Hi,  I am using hikashop for registering new users. When the user registers, they are not automatically logged in.  However, when the user registers during the checkout process, they are automatically logged in and it proceeds to the next step. How can i change this, that they are also automatically logged in with normal hiksahop registration not during checkout process.  Thanks and br")* was created by *[tgdkere2](/forum/user/8136-tgdkere2 "View tgdkere2's Profile")*

Hi,

I am using hikashop for registering new users.
When the user registers, they are not automatically logged in.

However, when the user registers during the checkout process, they are automatically logged in and it proceeds to the next step.
How can i change this, that they are also automatically logged in with normal hiksahop registration not during checkout process.

Thanks and br

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NjM1NzMtYXV0b2xvZ2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 1 week ago [\#132217](#132217) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[AutoLogin](/forum/33-customers/863573-autologin#132217 "Hi,  I am using hikashop for registering new users. When the user registers, they are not automatically logged in.  However, when the user registers during the checkout process, they are automatically logged in and it proceeds to the next step. How can i change this, that they are also automatically logged in with normal hiksahop registration not during checkout process.  Thanks and br")*

Hi,

Hikashop is based on the Joomla registration system, but we are adding some more fields.
So it's not a HikaShop related problem, you can try with the Joomla registration, it don't auto log after the registration process ![;)](/media/kunena/emoticons/24.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NjM1NzMtYXV0b2xvZ2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[tgdkere2](/forum/user/8136-tgdkere2 "View tgdkere2's Profile")**
- [![tgdkere2's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8136-tgdkere2 "View tgdkere2's Profile") Topic Author
- [ Offline](/forum/user/8136-tgdkere2)

Less More

- Posts: 82
- Thank you received: 5
-
-

13 years 1 week ago [\#132219](#132219) by [tgdkere2](/forum/user/8136-tgdkere2 "View tgdkere2's Profile")  Replied by *[tgdkere2](/forum/user/8136-tgdkere2 "View tgdkere2's Profile")* on topic *[AutoLogin](/forum/33-customers/863573-autologin#132219 "Hi,  I am using hikashop for registering new users. When the user registers, they are not automatically logged in.  However, when the user registers during the checkout process, they are automatically logged in and it proceeds to the next step. How can i change this, that they are also automatically logged in with normal hiksahop registration not during checkout process.  Thanks and br")*

I know that Joomla does not auto login.
But hikashhop does, when registering during the checkout process.

I would like to have the same code executed for "normal" registering like it is when registering during checkout.
Where should i add the code for this ? In after_register file from hikashop ?
It should not interfere with hikashop.
So hikashop registration should be fully finished (incl. adding address and custom fields etc.)
I tried wit an autologin plugin, but then the adress and custom fields were not added.
Can you tell me, where I should add code, so that it will notinterfere with hikashop.
I would like to add something like:

function autoLogin($user,$isnew){
$app = JFactory::getApplication();
if($app-&gt;isSite() &amp;&amp; $isnew)
{
\# Login process
$credentials = array(
"username" =&gt; $user["username"],
"password" =&gt; $user["password_clear"]
);
}
$app-&gt;login($credentials);
}

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NjM1NzMtYXV0b2xvZ2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

13 years 1 week ago [\#132417](#132417) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[AutoLogin](/forum/33-customers/863573-autologin#132417 "Hi,  I am using hikashop for registering new users. When the user registers, they are not automatically logged in.  However, when the user registers during the checkout process, they are automatically logged in and it proceeds to the next step. How can i change this, that they are also automatically logged in with normal hiksahop registration not during checkout process.  Thanks and br")*

That code is not valid. You were right that you need to add custom code in the file "after_register" via the menu Display&gt;views, but it's not the correct code.

You should have instead something like that: Code:

&lt;?php $app = JFactory::getApplication(); $credentials = array('username'=&gt;$_REQUEST['data']['register']['username'],'password'=&gt;$_REQUEST['data']['register']['password']); $app-&gt;login($credentials); ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NjM1NzMtYXV0b2xvZ2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[tgdkere2](/forum/user/8136-tgdkere2 "View tgdkere2's Profile")**
- [![tgdkere2's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8136-tgdkere2 "View tgdkere2's Profile") Topic Author
- [ Offline](/forum/user/8136-tgdkere2)

Less More

- Posts: 82
- Thank you received: 5
-
-

13 years 1 week ago [\#132441](#132441) by [tgdkere2](/forum/user/8136-tgdkere2 "View tgdkere2's Profile")  Replied by *[tgdkere2](/forum/user/8136-tgdkere2 "View tgdkere2's Profile")* on topic *[AutoLogin](/forum/33-customers/863573-autologin#132441 "Hi,  I am using hikashop for registering new users. When the user registers, they are not automatically logged in.  However, when the user registers during the checkout process, they are automatically logged in and it proceeds to the next step. How can i change this, that they are also automatically logged in with normal hiksahop registration not during checkout process.  Thanks and br")*

Hi,

The code is working well.
However, it is not possible to redirect the user in after_register file.
If redirecting is used, the address and custom fields will not be stored.

Anyway, thanks a lot for your help !

Thanks and br
Rene

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NjM1NzMtYXV0b2xvZ2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.048 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
