This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

sfDoctrineGuardUser - newbee question

Ask help about existing plugins, or find advice about the way to build up your own.

sfDoctrineGuardUser - newbee question

by barbq » Sun Aug 09, 2009 12:43 pm

Hi,

I want to build a webpage that uses sfDoctrineGuardUser plugin for backend and frontend. I know I can do it, but there is one more question that I couldn't find. After I installed that plugin, for frontend solution I set up relations between sfGuardUser table and a few of tables created by me. Unfortunately I experience some errors, especially after rebuilding schema on changes (errors that talk about redeclaring some base classes). So, I've just started wonder if it is ok to mix up my tables with tables created by plugin and what should be the proceeding steps. Could anybody help?

Thanks,
BarBQ
barbq
Member
 
Posts: 43
Joined: Sat Jan 10, 2009 3:36 pm
Location: Poland

Re: sfDoctrineGuardUser - newbee question

by DBA_Alex » Wed Aug 12, 2009 9:34 pm

Connecting tables you develop with tables from a symfony plugin should work without problems. Make sure that you are associating your table(s) to the plugin tables' primary key(s).

A prime example of this is within sfDoctrineGuardPlugin - linking the plugin to a sf_guard_user_profile table.

Hope this helps :)~ :-)~ :smile:
Currently Using
---------------------------
Symfony 1.4/Doctrine 1.2
MySQL 5.1
DBA_Alex
Faithful Member
 
Posts: 276
Joined: Mon Jul 28, 2008 4:59 pm
Location: North Carolina, USA

Re: sfDoctrineGuardUser - newbee question

by barbq » Sun Aug 16, 2009 11:18 am

Thanks for your post, but it's too general. Maybe it's my fault I wasn't too specific with my question. So, I'm trying to be more precise :)~ :-)~ :smile:

I got two schema.yml files. One with my tables, and the second with plugin tables schema. And now: if my tables have some key relations to tables in plugin schema, then should I leave both schemas just like they exists, or maybe should I join them into one schema file, or ...?
At the moment I got two schemas, but I see after "build-all-reload" tables in MySQL are created without key relations - so this is rather wrong...


And one more important thing. The ORDER of creating model and sql for schemas. I guess the first one is schema from main config folder, then schema from plugin. Am I correct? If so, then how to use sfGuardUser to make it fully functional in frontend application?
barbq
Member
 
Posts: 43
Joined: Sat Jan 10, 2009 3:36 pm
Location: Poland

Re: sfDoctrineGuardUser - newbee question

by DBA_Alex » Mon Aug 17, 2009 8:15 pm

If you associate your application's schema file to your plugin's schema file, then the relationship should be created. The whole purpose of the plugin system is to contain functionality within a single unit that can be transferred to other projects if need be.

Where is your second schema file located? Can you post an example of the application schema and a related table from the plugin schema?
Currently Using
---------------------------
Symfony 1.4/Doctrine 1.2
MySQL 5.1
DBA_Alex
Faithful Member
 
Posts: 276
Joined: Mon Jul 28, 2008 4:59 pm
Location: North Carolina, USA

Re: sfDoctrineGuardUser - newbee question

by barbq » Tue Aug 18, 2009 10:41 pm

Thank you for reply. I think I need to learn a bit about doctrine and yaml files structure, because my knowledge is nearly absolute zero... :?~ :-?~ :???: Every time I make rebuild after small changes I get different error message. This time was 'Unknown method sfGuardUser::checkPassword'. So, I'm getting to learn first, then will make an example and then... I hope won't be necessary to get back to this thread :)~ :-)~ :smile:
barbq
Member
 
Posts: 43
Joined: Sat Jan 10, 2009 3:36 pm
Location: Poland

Re: sfDoctrineGuardUser - newbee question

by thronic » Sat Jan 16, 2010 7:31 am

i too am having the same issue with sfDoctrineGuardPlugin. I'm wondering if anyone can help me out.

I was working on a project at work just playing around with sfDoctrineGuardPlugin. Everything was working perfectly.

I decided to zip and copy my app to a usb key and install it at home. same os (ubuntu).

Now when i try to log in i get the following error as well:

Unknown method SfGuardUser::checkPassword

i can't for the life of me understand it. I've uninstalled and reinstalled the plugin, i've cleared cache, rebuilt models, forms, etc...

If i turn off security my app is working fine.

Any ideas??
thronic
Junior Member
 
Posts: 5
Joined: Thu Mar 19, 2009 11:18 pm

Re: sfDoctrineGuardUser - newbee question

by Ail5urfer » Sun Sep 16, 2012 4:38 pm

Have you found an answer to this problem ? (I mean the "Unknown method SfGuardUser::checkPassword" message)
I get it after doing just after entering login/pwd to access my backend app :
Code: Select all
php symfony doctrine:build-db

=> any relation ? (it was working before, and as a newbie, I don't know really where to look for...)
Thanks
My symfony 1.4 site : Kitchen Convert Tools : adjust recipes quantities
My Symfony2 lab site : MusiqueEntrePotes : easily share streaming music links
SGNFM
Ail5urfer
Junior Member
 
Posts: 4
Joined: Sun Sep 16, 2012 4:27 pm