Hello everybody!
First of all i would like to thanks a loto arkepp for his great job! Go arkepp!!! I appreciate this too much!!
I would like to ask you if is it possible to avoid that after each drupal login the user is redirect to the forum profile, redirecting it to the drupal site.
I looked at the source files, and i found something, but i don't understand well what to do.
A tip for the next version: make the drupal table prefix a variable ;)
Bye!
Note from arkepp: I don't endorse the lines below, I believe the problem lies elsewhere.
SOLVED, but introduce security problems.
The problem is that you have to set the right permission as administrator.
In particulare, you have to set that:
But if you set those permissions, you allow to have different email between the forum and drupal ,and that's bad.
I strangely removed that permissions and now it works (?!?).
Comments
The module should not
The module should not redirect you anywhere upon login, so it's either misconfigured or you have found a bug. Test on http://kepp.net/phpbb3
Were you redirected anywhere in particular before you installed this module? I know you can configure what is supposed to be the front page, /node by default, but it's not obvious to me what is causing your problem.
same here
Hi arkepp,
i'm having the same "problem" as alexic whent he user logs in they are getting redirected to there forum profile,but i think you can disable that by comment out the log in lines in the phpbb .htacces..
Where did you put the
Where did you put the .htaccess file? If it's in the phpBB subdirectory it should never affect anything in Drupal.
I checked
Hi everybody,
I checked the info about the site: before i installed it it redirected to "node". After the installation of phpbb, i set the home page to "benvenuti" (i use clear urls).
I tried to set again the home page to "node" but it still redirect me to the forum profile.
I think that the problem is located in phpbb.module, about line 160:
case 'view':// Code removed, use phpBB's profile instead
if(! user_access('edit drupal users') ) {
header('Location: '.$phpbbcfg['path_abs'].'memberlist.php?mode=viewprofile&u='.$user->uid, TRUE, 301);
exit();
}
break;
The code below redirect you at the viewprofile of the forum!
An hack could be
header('Location: '.$phpbbcfg['path_abs'].'memberlist.php?mode=viewprofile&u='.$user->uid, TRUE, 301);with
header('Location: '.base_path());.Now it redirect you to the home page, but it redirect you to the home page even if you click on "profile" on the drupal user menu...
:(
That code is there for a
That code is there for a good reason,
case 'view':....
break;
is what is executed when someone views a user profile.
I'm not sure what is causing your problem... what happens if you disable the module, but leave all the files in place?
Yes, I know what is the
Yes, I know what is the reason ;)
If i disable the module...simply it's like if I never had the module! :) i have no blocks, no logins, no logout. After login, i am redirected to the profile page.
I enabled it again.
I'll try to set different home pages.
Okay, so it's not the code
Okay, so it's not the code that does it, so how does the .htaccess file in the root of Drupal look?
My best guess is that you and demon326 copied phpbb.htaccess to /.htaccess instead of //.htaccess
the inside of my .htacces file
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "(.(engine|inc|info|install|module|profile|po|sh|.sql|theme|tpl(.php)?|xtmpl)|code-style.pl|Entries.|Repository|Root|Tag|Template)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example.com$ [NC]
# RewriteRule ^(.)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
# RewriteRule ^(.)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
#RewriteBase /drupal
# Rewrite old-style URLs of the form 'node.php?id=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]
# Rewrite old-style URLs of the form 'module.php?mod=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]
# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
# $Id: .htaccess,v 1.81.2.2 2007/05/21 01:34:59 drumm Exp $
php_value memory_limit 30M
ow and arkepp,its not possible to overwrite the drupal .htacces cause drupal wont work anymore when you do it...
the phpbb htacces file:
<IfModule mod_rewrite.c>
RewriteEngine on
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
#RewriteBase /
RewriteRule ^inbox$ ucp.php?i=pm&folder=inbox [L]
RewriteCond %{QUERY_STRING} ^mode=login(.)$
RewriteCond %{QUERY_STRING} !^bypass=true(.)$
RewriteRule ^ucp.php(.)$ ../phpbb/login [L]
RewriteCond %{QUERY_STRING} ^mode=register(.)$
RewriteRule ^ucp.php(.)$ ../user/register [L]
RewriteCond %{QUERY_STRING} ^mode=logout(.)$
RewriteRule ^ucp.php(.)$ ../phpbb/logout [L]
RewriteCond %{QUERY_STRING} ^mode=sendpassword(.)$
RewriteCond %{QUERY_STRING} ^mode=resend_act(.)$ [OR]
RewriteRule ^ucp.php(.)$ ../user/password [L]
</IfModule>
i hope you can find the "bug"
I don't understand what is
I don't understand what is the address //.htaccess.
I placed it into the /forum directory.
/ is my drupal root
/forum is my php root.
:(
Sorry, i wrote
Sorry, i wrote [drupal-root]/[phpBB-directory] , forgetting groups.drupal.org removes angle brackets.
demon326's files suggest that my guess was wrong, so I'm not sure what's causing it.
any news? :(
any news? :(
SOLVED :D The problem is
SOLVED :D
The problem is that you have to set the right permission as administrator.
In particulare, you have to set that:
great!
Hi,its great that you found the problem,but normal users maynot edit there account settings... so can you explain it a little bit beter?..
these settings is what i have now:
phpbb module:
edit drupal users [yes]-->only the admin and super user may do it
administer phpbb [yes]-->only admin and super user can do it
module users:
acces to profiles: [yes]-->all rolles..
That's a really bad idea,
That's a really bad idea
, your users will end up with different emails and passwords in the forum and Drupal. And you will get lots of questions about which profile they should edit.
How does this solve your problem, are people no longer redirected to their Drupal profiles after logging in?
Sorry about the big letters, please remove your's and I'll remove mine, I just need people to see that I think this is a very bad idea in general.
Yes, you're right, it's a
Yes, you're right, it's a bad thing.
But misteriously (that's correct?) i removed what i set, and it works... !?!?!?!?!?
So, asking again, where do
So, asking again, where do you end up now, after logging in?
Are you using the block, or forcing people to go to /user/login ?
what block? I set the home
what block?
I set the home page path in the default drupal setting form, i changed it a lot tryng different pages and now it works :s
still the same prob
Hi,i'm still having the problem that users ar getting redirected to there forum profile when they log in...