This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » phpBB Connector ?
Re: phpBB Connector ? [message #103338 is a reply to message #103333 ] Sat, 31 July 2010 07:54 Go to previous messageGo to next message
ricardojguzman  is currently offline ricardojguzman
Messages: 26
Registered: March 2010
Junior Member
Hello Comb, sorry for being late.

Should we call the phpbbintegration methods from the /plugins/sfForkedDoctrineApplyPlugin/Action/sfApplyActionsLi brary
?


In that library there are all the methods of the apply (Create new, log in and such).

I'm thinking about calling the integration methods inside some of them.

Is that really the correct way?

Thanks for your help.
Re: phpBB Connector ? [message #103344 is a reply to message #103338 ] Sat, 31 July 2010 09:57 Go to previous messageGo to next message
comb  is currently offline comb
Messages: 25
Registered: March 2010
Junior Member
fortx wrote on Sat, 31 July 2010 02:20

there isn't an insert/create user method in session.php only methods for creating session and for user already registered. There is a function for log in but nothing tu create users.

Hi, yeah sorry, it's in the functions_user.php
Here is the source of the user_add(...) function:

https://www.phpbb.de/infos/3.0/xref/includes/functions_user. php.source.html#l145

See x-ref for usage: https://www.phpbb.de/infos/3.0/xref/_functions/index.html#us er_add

But you will have to re-write it and will not be able to use this method, because phpbb uses the global variables $db, $user, etc ... . You cannot load them within symfony. But I guess you could reduce the user_add() function to the basic db-queries and just implement them in symfony. Smile

For db-queries on the phpbb3-database you can use the phpintegration (sqlExec(...)).

ricardojguzman wrote on Sat, 31 July 2010 07:54


Should we call the phpbbintegration methods from the /plugins/sfForkedDoctrineApplyPlugin/Action/sfApplyActionsLi brary
?

[...]

I'm thinking about calling the integration methods inside some of them.


you could, but I think it's cleaner to not modify the plugin and to use hooks/listeners (if there are some) or to just use the actions to trigger phpbb3-user-creation.
This way you can re-use your code in the feature even if you don't use the forkedDoctrineApplyPlugin.

[Updated on: Sat, 31 July 2010 10:04]

Re: phpBB Connector ? [message #103355 is a reply to message #103344 ] Sat, 31 July 2010 15:51 Go to previous messageGo to next message
fortx  is currently offline fortx
Messages: 28
Registered: June 2010
Location: Santo Domingo, Dominican ...
Junior Member
I have to implement that method within phpbbintegration class right? or where?
Re: phpBB Connector ? [message #103356 is a reply to message #103355 ] Sat, 31 July 2010 16:45 Go to previous messageGo to next message
comb  is currently offline comb
Messages: 25
Registered: March 2010
Junior Member
yes you could do so. Smile
Re: phpBB Connector ? [message #103357 is a reply to message #103356 ] Sat, 31 July 2010 17:04 Go to previous messageGo to next message
fortx  is currently offline fortx
Messages: 28
Registered: June 2010
Location: Santo Domingo, Dominican ...
Junior Member
How did you manage to create users in your symfony app and use this phpbbintegration class to let them log in with the same credentials (username and password) that they registered within symfony? because there are a bunch of variables and querys and arrays of data to be inserted in different tables of phpbb in functions_user.php.

Do I have to make through all that data and variables with querys to fill out the tables of phpbb so the users can use the same username and password they entered when they were applying for an account in my symfony app?
Re: phpBB Connector ? [message #103360 is a reply to message #103357 ] Sat, 31 July 2010 19:10 Go to previous messageGo to next message
comb  is currently offline comb
Messages: 25
Registered: March 2010
Junior Member
fortx wrote on Sat, 31 July 2010 17:04

How did you manage to create users in your symfony app and use this phpbbintegration class to let them log in with the same credentials (username and password) that they registered within symfony?

My usecase was the otherway round.. I have a phpbb3-community and wanted to let phpbb users do things on the main website.


Quote:

because there are a bunch of variables and querys and arrays of data to be inserted in different tables of phpbb in functions_user.php.

yeah.. if you have any questions regarding phpbb3: they have a great community! Just check out phpbb.com


Quote:

Do I have to make through all that data and variables with querys to fill out the tables of phpbb so the users can use the same username and password they entered when they were applying for an account in my symfony app?
Yes I guess there are more than 1 table to query. Not sure about the details.. maybe ask in the phpbb3 forums for help, if you are not sure about the tables.

Re: phpBB Connector ? [message #103366 is a reply to message #103360 ] Sat, 31 July 2010 23:56 Go to previous messageGo to next message
fortx  is currently offline fortx
Messages: 28
Registered: June 2010
Location: Santo Domingo, Dominican ...
Junior Member
My username and password appears in the phpbb tables with the new method I created in the phpbbintegration class but I can't log in, phpbb says to me that I don't exist. I also inserted my email from the profile table but in the foroum it appears like <doctrine array or somethin like that>.
Re: phpBB Connector ? [message #103367 is a reply to message #103366 ] Sun, 01 August 2010 00:18 Go to previous messageGo to next message
comb  is currently offline comb
Messages: 25
Registered: March 2010
Junior Member
you might want to show the phpbb3 community what you have inserted to the db (provide the code to them) and see what they tell you about the phpbb3-tables. They know what and in which table to insert data.
Re: phpBB Connector ? [message #103377 is a reply to message #103367 ] Sun, 01 August 2010 19:47 Go to previous message
ricardojguzman  is currently offline ricardojguzman
Messages: 26
Registered: March 2010
Junior Member
Thanks for your help comb. Fortx is currently checking the interactions of the phpbb tables when a user is created. He is creating test users via the forums to see which tables are affected by this.

After we solve this we'll only need to change the status of the phpbb tables via the sfApply login method.

Thanks again.
Previous Topic:How to validate data for a restful service ?
Next Topic:Doctrin Admin Generator: Preview Before Save
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software