Categories

Your Name :
Your Email :
Your Message :
Security Code :
  

 

Community Builder auto login after registration

Print PDF

Joomla

This hack will let users auto login after completed registration . so they dont have to go and login . but you must disable the email confimation from the community builder backend

Community Builder -> Configurations -> Registrations -> Require Email Confirmation

and Set it to "NO".

no we will have to edit the components/com_comprofiler/comprofiler.php

on  line 1388

echo \"n" . implode( "\n", $messagesToUser ) . "\n"; 

replace with

 $options = array();
$options['remember'] = false;
$credentials = array();
$credentials['username'] =$username;
$password = cbGetParam( $_POST, 'password', '');
$credentials['password'] = $password;
global $mainframe;
$error = $mainframe->login($credentials, $options);

//here you can add the default page after registration ie: http://www.inowweb.com
$return_page=”index.php”;

//message that will appear after registration
$mainframe->redirect($return_page, ‘Registration Completed.’);

This works on Community builder Version 1.2

here is the comprofiler.php you can download it from here

Comments (15)Add Comment
0
Michael Weitzman
April 06, 2009
76.249.27.44
Votes: +0
...

hi there echo "n" . implode( "n", $messagesToUser ) . "n";

does not appear on line 1388 using cb version 1.2 joomla 1.5 it appears in two other places furhter down in the code on lines 3723 and line 3793. which do I replace?

Administrator
Administrator
April 06, 2009
41.232.143.116
Votes: +0
...

there is only 2444 lines in the comprofiler.php .make sure that no one modified this file

the following lines will be under the 1388.

/**
* Ajax function: Checks the availability of a username for registration and echoes a text containing the result of username search.
*
* @param string $username
*/

0
Pierre
April 16, 2009
82.125.131.94
Votes: +0
...

hello,

it doesn't work with random password generation, i search a solution, if i found, i will post it here

0
corinne
April 21, 2009
62.194.38.84
Votes: +0
...

Hi, I think I love you! :-) Is works just perfect, using Joomla 1.5.10 and CB 1.2 RC4.

The code to replace was on line 1366 in my file. I use random passwords and experienced no problems.

0
corinne
April 22, 2009
195.241.158.188
Votes: +0
...

O no, concluded to fast...
The hack is indeed not working with the password generator.
But when users put their own password in it works great. Well I can get over it but will search for a solution also.

My users do not have to put in a password because it is only for a one time survey-website, so maybe I can give the password field a default value in the code and then remove it from the registrationpage...

0
benc
May 06, 2009
202.37.75.130
Votes: +0
...

this hack works great smilies/grin.gif

but what if I want the user to go to the page they came from before registering, rather than index.php or another specified page?

I tried "history.back()" but failed smilies/sad.gif

0
bibiyanki
May 07, 2009
88.171.33.34
Votes: +0
...

doesn't work if your register are in wrapper...smilies/sad.gif

0
sarah
January 20, 2010
119.93.16.130
Votes: +1
...

Fantastic! I think I love you too!!smilies/kiss.gif

0
Matt
May 12, 2010
99.104.150.237
Votes: +0
...

IT WORKED AWESOME! THANKS A BUNCH!

0
Tmfr
May 17, 2010
59.90.80.14
Votes: +0
...

using CB 1.2.2

doesnt have this line:

echo "n" . implode( "n", $messagesToUser ) . "n";

0
limo hire
July 08, 2010
89.242.1.11
Votes: +0
...

After reading this post – I would like to thank you for sharing this amazing information for readers.

0
dan
August 06, 2010
58.179.107.11
Votes: +0
...

I think the line you want is 2777 and the code is echo "n" . implode( "n", $messagesToUser ) . "n"; however I get errors when I insert the code above here - I guess it was for an older version. Will keep digging.

0
amy
August 10, 2010
111.240.131.172
Votes: +0
...

if use alpharegistration,how can i
auto login after registration ?

0
Shunsho
September 18, 2010
200.111.8.134
Votes: +0
...

It's works perfect to me.
I use CB 1.2.3 and Joomla 1.5.20
The code was on the line 1053 and have divs on it:

echo "n" . implode( "n", $messagesToUser ) . "n";

Thank you very much.

0
Jose Dias
August 14, 2011
68.110.87.228
Votes: +0
...

Thank you so much for this code. It worked like a charm in CB1.4 / j1.6 installation.

I had only to fix 2 typos in the code:

1 - double quotes in line $return_page=”index.php”;
I used: $return_page = "index.php";

2 - replaced the quotes in line $mainframe->redirect($return_page, ‘Registration Completed.’);
I used $mainframe->redirect($return_page, 'Registration Completed.');

Other than that the code worked perfectly.

Thank you so much for posting.

Write comment
 
  smaller | bigger
 

security image
Write the displayed characters


busy

http://www.inowweb.com/images/stories/downloads.png

Our Process | Request Quote | Web Design | Web Development Service | Internet Marketing | ecommerce | Graphic Design
Search Engine Optimization (SEO) | Flash Design | Portfolio | FAQs | Contact Us | SiteMap | xml SiteMap

<p align="center">Copyright © 2010 iNowWeb Web Design Company. All Rights Reserved.<br><a href="/terms-a-conditions" mce_href="/terms-a-conditions" title="terms &amp; conditions">Terms &amp; Conditions</a> | <a href="/privacy-policy" mce_href="/privacy-policy" title="Privacy Policy">Privacy Policy</a><br mce_bogus="1"></p><p align="center"><a href="http://validator.w3.org/check?uri=http://www.inowweb.com" mce_href="http://validator.w3.org/check?uri=http://www.inowweb.com" target="_blank" rel="nofollow"><img src="/images/stories/xhtml.png" mce_src="/images/stories/xhtml.png" alt="XHTML" title="XHTML" border="0"></a> <a href="http://jigsaw.w3.org/css-validator/validator?uri=http://www.inowweb.com" mce_href="http://jigsaw.w3.org/css-validator/validator?uri=http://www.inowweb.com" target="_blank" rel="nofollow"><img src="/images/stories/css.png" mce_src="/images/stories/css.png" alt="CSS" title="CSS" border="0"></a>    </p><p><input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden"></p><div id="refHTML"></div>


<div align="left">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We service but are not  limited to servicing the following cities:<br>
            <mce:style><!--
                .sometable td {padding-right:5px;}
            
--></mce:style><mce:style mce_bogus="1"><!--
                .sometable td {padding-right:5px;}
--></mce:style><mce:style mce_bogus="1"><!--
                .sometable td {padding-right:5px;}
--></mce:style><mce:style mce_bogus="1"><!--
                .sometable td {padding-right:5px;}
--></mce:style><mce:style mce_bogus="1"><!--
                .sometable td {padding-right:5px;}
--></mce:style><mce:style mce_bogus="1"><!--
                .sometable td {padding-right:5px;}
--></mce:style><mce:style mce_bogus="1"><!--
                .sometable td {padding-right:5px;}
--></mce:style><mce:style mce_bogus="1"><!--
                .sometable td {padding-right:5px;}
--></mce:style><mce:style mce_bogus="1"><!--
                .sometable td {padding-right:5px;}
--></mce:style><style mce_bogus="1"><!--
                .sometable td {padding-right:5px;}
--></style>
            <table class="sometable mceItemTable" align="center" cellpadding="0" cellspacing="7">
                <tbody><tr>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top">Albuquerque<br>
                    Allentown<br>

                    Arlington <br>
                    Atlanta <br>
                    Austin <br>
                  Baltimore<br>
                  Canada</td>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top">Bridgeport <br>
                    Boston <br>

                    Charlotte <br>
                    Chicago<br>
                    Cleveland <br>
                  Colorado Springs<br>
                  United Kingdom<br></td>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top">Columbus <br>
                    Dallas <br>

                    Deleware <br>
                    Dover <br>
                    Denver <br>
                  Detroit<br>
                  australia</td>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top">El Paso <br>
                    Fort Worth<br>

                    Fresno <br>
                    Frisco<br>
                    Grand Prairie <br>
                  Grapevine<br>
                  India</td>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top">Harrisburg <br>
                    Honolulu <br>

                    Houston <br>
                    Indianapolis <br>
                    Jacksonville <br>
                  Jersey City<br>
                  Brazil</td>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top"> Kansas City <br>
                    Las Vegas <br>

                    Lewisville<br>
                    Long Beach <br>
                    Los Angeles <br>
                  Louisville<br>
                  Spain</td>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top"> Mansfield <br>
                    Memphis <br>

                    Mesa<br>
                    Miami <br>
                    Milwaukee<br>
                  Minneapolis<br>
                  Italy</td>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top">Nashville <br>
                    New Orleans <br>

                    Newport<br>
                    New York <br>
                    Newark <br>
                  Oakland<br>
                  Egypt </td>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top">Oklahoma City <br>
                    Omaha <br>

                    Orlando<br>
                    Panama City<br>
                    Pennsylvania<br>
                  Philadelphia<br>
                  UAE</td>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top">Phoenix <br>
                    Plano <br>

                    Portland <br>
                    Sacramento <br>
                    St. Louis <br>
                  Stamford</td>
                  <td style="border-right: 1px solid rgb(153, 153, 153); line-height: 14px;" mce_style="border-right: 1px solid #999999; line-height: 14px;" valign="top">San Antonio<br>
                    San Diego <br>

                    San Francisco <br>
                    San Jose <br>
                    Southlake <br>
                  Seattle</td>
                  <td style="line-height: 14px;" mce_style="line-height: 14px;" valign="top">Tucson <br>
                    Tulsa <br>

                    Trenton <br>
                    Virginia Beach <br>
                    Washington <br>
                  Wichita</td>
                </tr>
              </tbody></table>
            <br>
</div><p><input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden"></p><div id="refHTML"></div><p><input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden"></p><div id="refHTML"></div><p><input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden"></p><div id="refHTML"></div><p><input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden"></p><div id="refHTML"></div>

Copyright © 2011 iNowWeb Web Design Company. All Rights Reserved.
Terms & Conditions | Privacy Policy

XHTML CSS