Roundcube Community Forum


How to go login and go to inbox programatically after registering a new user

Started by bugler, January 02, 2007, 02:18:01 PM

Previous topic - Next topic


Hello all,

I am new to roundcube and this is my 1st message.

I have developed a page where people can register into my mail server.
It works ok except that I donÃÂ,Ã,´t know how to log in the user(i have the $user & $pass) so i want to use them to log in the user and i want to go to the inbox after that.

I am struggling to understand the index.php file and i donÃÂ,Ã,´t know how to do it.

Can anyone help me?

Thanks. Ed.


This question is probably offtopic in the requests forum...

If I understand you correctly, then one possible hack to do it would be using a intermediary page like the following, which would just submit the form with login-information to roundcube:

 <title>Redirect page</title>
<body onload=&quot;forms[0].submit();&quot;>
<form action=&quot;my-roundcube-url&quot; method=&quot;post&quot;>
 <input type=&quot;hidden&quot; name=&quot;_action&quot; value=&quot;login&quot;>
 <input type=&quot;hidden&quot; name=&quot;_user&quot; value=&quot;$user&quot;>
 <input type=&quot;hidden&quot; name=&quot;_pass&quot; value=&quot;$pass&quot;>
 <input type=&quot;submit&quot; value=&quot;Enter Mailbox&quot;>

Nothing pretty, but should work.



I didnÃÂ,Ã,´t see your answer until now.

Thanks for answering.

I havenÃÂ,Ã,´t been able to solve it (well actually once it worked 2 or 3 times and then it hang up again).



I didn't think i should post in this thread considering that it's in the wrong category, but I didn't think it would be right to make another post about this same thing, so here it goes. I've been using Roundcube for about a month now for a free email site much like yahoo mail. I'm using the latest RC2 version, and I have a registration system. About the registrations system to start, how it works it it runs through two files, the first is the data gathering section (form), the second is the data processing section (form processor). The form section gathers the appropriate information such as "Username" and "password" as well as a javascript password validation. The form processing section takes the form data and creates a new account through cpanel, with this method everything worked great but there was one problem, the users that registered had no way of knowing if they were registered, if there username was already taken, or if the server had an error. So I came up with a solution, the form processor would make the request to cpanel, and it would return the page contents, from there I added in a couple of these:
if (strpos($page, 'successfully') !== false) { echo '<center><h3>Registered</h3>Your account has been created, you may now login</center>'; }
and from there everyhting was working really smooth, the users liked it and I was happy. Now I've come accross this post and would like to implement this into my site but the problem is that theres no way for this form to tell weather the user was registered or not to log him in, how would I make it so that if the page returned successfully it sends the form to log in?

Thanks in advance,



Adjust the following code for your needs and place it in your registration script in an appropriate place.

// Login new user
$_POST['_user'] = $strUser . &quot;@&quot; . $strDomain;
$_POST['_pass'] = $strPass;
$_POST['_host'] = $strHost;
$_action = &quot;login&quot;;

NOTE: Your registration script must be included into roundcube index.php. Otherwise it won't work. You can submit the login and action data by URL. In this case you have to take care that the login data is encrypted strongly.

MyRoundcube Project (commercial)


I did not know there is a possibility in this manner.
Its very different to look and very interesting to view.You have to post different things.
data entry india