Re: [symfony-users] Existing site and symfony integration
On Fri, Jan 29, 2010 at 2:20 PM, Eno wrote: > On Fri, 29 Jan 2010, alessandro cinelli wrote: > > > I'm doing a huge refactor of an existing big site and i would like to > port > > it to symfony. > > The problem is that i can't wait to full migrate the site to symfony > > framework before going live, but I have to do it step by step, small > > integrations and refactors like dailymotion case history. > > > > What is the best way to achieve that? > > With a custom routing class? > > With a custom htaccess file? > > Is the existing site static? No, it's a huge bad written dynamic site :( > > Basically the symfony tree can be anywhere on your web server (usually its > a good idea to keep it outside any web-accessible folder) and your > controller loads the config and dispatches the request. > You will also need mod_rewrite enabled and htaccess files alongside each > controller. Since you already have a site and you dont want to break URLs, > then your routing should match the existing site as much as possible. > how can i do that? I tought to write a custom routing class, one that holds the old site parts and one for the new one. It's a work in progress as i said previously i would like to start porting piece by piece instead going live when the whole site is symfony ported. thanks cirpo -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] [Form Framework] Best way to implement change password functionality?
Hi, I'm trying to get my head around the form framework in Symfony 1.4. I've read the incredibly detailed section in the 'More with symfony' book, but I'm still a but unsure how to implement a simple 'Change password' functionality. The requirements are pretty basic, 1. There'll be two fields, `new_password`, and `confirm_new_password`. Both will be input fields. 2. The `new_password` field will be validated to be a string between 6 and 30 characters containing both letters and numbers. 3. The `confirm_new_password` field will be validated to match the `new_password` field exactly. Now, presently I implemented this by, - Adding 2 new fields to my form. - Adding a string validator to the `new_password` field to check the string length. - Adding a string validator to the `confirm_new_password` field to make sure it was filled in. - And then validating the new password is valid and matches the confirm password in a custom post validator. I did this because I didn't want to validate the `confirm_new_password` field until the `new_password` field was valid. Now to the point of my question. After reading the article mentioned above, I'm starting to think I should contain the two fields in either a single widget or in a sub form as they rely upon each other heavily, and one is useless without the other. I was wondering what peoples thoughts were on this, and if someone had implemented one, how they did it? Thanks Note: There is no `current_password` field as this is for my admin area. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: External user authentication with sfDoctrineGuardPlugin
The way that I addressed this was to: * Create a custom form for the signin process * In that form, replace the validator (change app_sf_guard_plugin_signin_form) * In the new validator, replace the code that throws an error if the user is not found in the database with code that authenticates against your external mechanism. * In the "external mechanism" create the user if the user does not exist in sf_guard_user, also update the user if the info has changed * return the new user to the validator I'm still not thrilled with this answer, so if anyone has an alternate solution, I would love to hear it. thanks ashton On Fri, Jan 29, 2010 at 10:00 AM, ashton honnecke wrote: > Both ways of authentication would be fine, but my main goal is to > allow users to login without requiring them to exist in the > sfGuardUserTable. I'm building a site for a client that has an api > that they want me to use to authenticate users against. I don't want > to have to insert into sf_user_guard just to allow a user to attempt > to login. > > It seems very strange that there would be such a great external > authentication system that then requires that the user already be in > the sf_guard_user table. I assume that I am missing something. > > These guys want to know how to do it as well: > http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/ > > On Fri, Jan 29, 2010 at 5:43 AM, Tom Ptacnik wrote: >> Of cource you can overwrite the sfGuardAuth module if you don't want >> to use it... I thought that you want to use both ways of >> autentification. >> >> >> On 28 led, 18:38, ashton honnecke wrote: >>> Thanks! >>> >>> So if I am understanding you, you are telling me that there is no way >>> to do this with the current sfGuardUser setup and that I will need to >>> I create a new module that I use for login. >>> >>> It doesn't seem to me that this is an uncommon request related to the >>> external password check, so It seems odd that I would need to re-write >>> the login in order to do so. >>> >>> Why would I want to make a new module and not just overwrite the >>> executeSignin method in the BasesfGuardAuthActions class? >>> >>> ashton >>> >>> >>> >>> On Thu, Jan 28, 2010 at 6:53 AM, Tom Ptacnik wrote: >>> > Create an module with "secure: is_secure: false" in which you can do >>> > what you want (create a user in sf_guard_user table ...) >>> >>> > On 28 led, 02:15, ashton wrote: >>> >> I have my external authentication working, but the problem that I am >>> >> running into is that there needs to be a user in the sfGuardUser table >>> >> that matches the username submit in the login form, otherwise the >>> >> login fails. >>> >>> >> So when I currently add 'return true;' to the top of the external auth >>> >> function, I can login with any password, for users that exist in the >>> >> sf_guard_table, but not with usernames that do not exist. >>> >>> >> I was wondering if there was a solution out there (ideally user >>> >> creation in the sfGuardUser table upon successful external >>> >> authentication), allowing me to perform my external checks even if the >>> >> username does not exist in the sf_guard_user table would work too, >>> >> because then I could just manually create the user if the external >>> >> auth was successful. >>> >>> >> thanks! >>> >> ashton >>> >>> > -- >>> > You received this message because you are subscribed to the Google Groups >>> > "symfony users" group. >>> > To post to this group, send email to symfony-us...@googlegroups.com. >>> > To unsubscribe from this group, send email to >>> > symfony-users+unsubscr...@googlegroups.com. >>> > For more options, visit this group >>> > athttp://groups.google.com/group/symfony-users?hl=en. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "symfony users" group. >> To post to this group, send email to symfony-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> symfony-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] cmt faire pour configurer la directive de configuration ServerName
ou es ce que je peut trouver la directive de configuration ServerName pour lui ajouter les parametre du serveur virtuels . et avant j'ai ouvert le fichier HTTP.CONF et y avai ça # # MySQL server administration. # Alias /phpMyAdmin /var/www/myadmin DirectoryIndex index.php Options Indexes Includes ExecCGI AllowOverride None Order deny,allow Allow from all et j ai ajouter ça # Be sure to only have this line once in your configuration NameVirtualHost 127.0.0.1:8080 # This is the configuration for Jobeet Listen 127.0.0.1:8080 DocumentRoot "/home/sfprojects/jobeet/web" DirectoryIndex index.php AllowOverride All Allow from All Alias /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf AllowOverride All Allow from All c'est ce qu'il fallai faire , j'esper que je ne me trompe pas ,??? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: External user authentication with sfDoctrineGuardPlugin
Both ways of authentication would be fine, but my main goal is to allow users to login without requiring them to exist in the sfGuardUserTable. I'm building a site for a client that has an api that they want me to use to authenticate users against. I don't want to have to insert into sf_user_guard just to allow a user to attempt to login. It seems very strange that there would be such a great external authentication system that then requires that the user already be in the sf_guard_user table. I assume that I am missing something. These guys want to know how to do it as well: http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/ On Fri, Jan 29, 2010 at 5:43 AM, Tom Ptacnik wrote: > Of cource you can overwrite the sfGuardAuth module if you don't want > to use it... I thought that you want to use both ways of > autentification. > > > On 28 led, 18:38, ashton honnecke wrote: >> Thanks! >> >> So if I am understanding you, you are telling me that there is no way >> to do this with the current sfGuardUser setup and that I will need to >> I create a new module that I use for login. >> >> It doesn't seem to me that this is an uncommon request related to the >> external password check, so It seems odd that I would need to re-write >> the login in order to do so. >> >> Why would I want to make a new module and not just overwrite the >> executeSignin method in the BasesfGuardAuthActions class? >> >> ashton >> >> >> >> On Thu, Jan 28, 2010 at 6:53 AM, Tom Ptacnik wrote: >> > Create an module with "secure: is_secure: false" in which you can do >> > what you want (create a user in sf_guard_user table ...) >> >> > On 28 led, 02:15, ashton wrote: >> >> I have my external authentication working, but the problem that I am >> >> running into is that there needs to be a user in the sfGuardUser table >> >> that matches the username submit in the login form, otherwise the >> >> login fails. >> >> >> So when I currently add 'return true;' to the top of the external auth >> >> function, I can login with any password, for users that exist in the >> >> sf_guard_table, but not with usernames that do not exist. >> >> >> I was wondering if there was a solution out there (ideally user >> >> creation in the sfGuardUser table upon successful external >> >> authentication), allowing me to perform my external checks even if the >> >> username does not exist in the sf_guard_user table would work too, >> >> because then I could just manually create the user if the external >> >> auth was successful. >> >> >> thanks! >> >> ashton >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "symfony users" group. >> > To post to this group, send email to symfony-us...@googlegroups.com. >> > To unsubscribe from this group, send email to >> > symfony-users+unsubscr...@googlegroups.com. >> > For more options, visit this group >> > athttp://groups.google.com/group/symfony-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Set default dsn with env vars?
Hi Eno, THanks for the reply. See inline. -T On Fri, Jan 29, 2010 at 5:10 AM, Eno wrote: > On Thu, 28 Jan 2010, Tennis Smith wrote: > > > I'm trying to set my default db based on an environment variable. The > > definition looks like this in my databases.yml file: > > > > test: > > foo: > > class: sfPropelDatabase > > param: > > dsn: > 'mysql://root:@localhost/test_foo' ?> > > > > > > Should this work? The idea is that if the env var FOO_DB has a value, it > > will be used as the dsn. > > Why do you need to do this? You can have multiple environments in symfony > and use multiple controllers to select between them. > I need it for concurrency. I have a single (large) group of tests. Run serially, the tests take about 1/2 an hr. Each test requires a pre-configured database. So, I've made 4 copies of the database to enable 4 concurrent tests. Therefore, I need way to have the default dsn set to a particular db. Picking the db needs to be dynamic. The incoming request can come from one of only 4 possible ip addresses. Each address is assigned to a particular db. Thus, what is needed is a reliable way to take the incoming ip address, and then make sure a specific db is used. Make sense? > > PHP scripts normally dont run from a shell so most probably environment > variables are not available. > Well, this script is called from the shell, and some env vars are already available. But I'm not able to get the dsn to change in this way. Why? I'm not sure. > > > > -- > > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- Tks, -T -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] [1.4.1] (Propel) Admin Generator Behavior - Why does it work like this?
Hi there, I've been having some 'issues' with the admin generator (Propel version). The HTML generation behavior between the list view and the form view is very different, and I'd like to know why, as the form view works better (and as expected) compared to the list view. I have the following YAML for the 'edit' action, edit: actions: custom: { confirm: 'Run this custom action?' } _list: ~ _save: ~ This generates the following HTML/PHP for the custom action specified, // Snip ... linkToCustom($form->getObject(), array ( 'confirm' => 'Run this custom action?', 'params' => array( ), 'class_suffix' => 'custom', 'label' => 'Custom',)) ?> getId(), array()) ?> // Snip ... Now, if I add my custom action to the YAML for the list view, list: object_actions: custom: { confirm: 'Run this custom action?' } _edit:~ _delete: ~ I get the following HTML generated, // Snip ... getId(), array()) ?> // Snip ... There's some distinct differences here that I find very odd, 1. The form actions code checks to see if there is a method on the helper, and uses it if so, falling back to a standard link_to() function if not. However, the list actions code just uses the link_to () function, not even trying to use the helper. 2. The form actions code passes my custom confirm message to the custom helper method, but neither templates pass it to the link_to(). Why is this? I'm hoping this is a bug. If someone could shed some light as to why the two generate differently, I'd really appreciate it. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Doctrine inheritance and i18n forms
Hi, Same version here, sf1.4 and doctrine 1.2. I've got the same result as you. The base class inheritance schema is correct. The problems appears if you add the I18n behavior to you schema. Read the ticket I wrote to fully understand the problem, I'v joined an example schema.yml. For the record, I've written a complete howto related to the subject we're talking about. I'me posting a link, as I think one might find it interesting. http://www.miximum.fr/tutos/449-optional-translation-form-for-i18n-objects-with-symfony-and-doctrine Regards. Thibault. On Jan 29, 11:40 am, Stéphane wrote: > Hi, > > I'm using sf1.4, doctrine1.2. > I have a class and an extending class. > > Got generated doctrine models and forms, and the extending class's form is > inheriting from its super class' form. > > vsPage inherits vsBasicpage and I get this in the base form class of the > vsPage : > "abstract class BasevsPageForm extends vsBasicpageForm" > > Is this what you want ? > > What is your sf version ? > > Cheers, > > Before Printing, Think about Your Environmental Responsibility! > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! > > On Fri, Jan 29, 2010 at 11:34 AM, Thibault Jouannic wrote: > > > Created the ticket. You can see it here : > > >http://trac.symfony-project.org/ticket/8199 > > > Regards. > > > -- > > You received this message because you are subscribed to the Google Groups > > "symfony users" group. > > To post to this group, send email to symfony-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: New element with parameter
I think you have to possibilities: 1) send it via URL 2) send it via session I would preffer to use option 1) On 28 led, 21:01, Diego Bello wrote: > Hi guys, > > I have a site (frontend) with a list of deploys. Now, each deploy can > have several activities. When I click on new activity, I have to > choose the deploy I'm talking about. Is there a way I can tell the new > form to use the deploy I'm surfing now?. I mean, is it possible to > send to the "new activity page" the id of the deploy so it can > understand that I am talking about, let's say, the deploy of machine 1 > and not the one of machine 127?. > > Thanks. > > -- > Diego Bello Carreño -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Existing site and symfony integration
On Fri, 29 Jan 2010, alessandro cinelli wrote: > I'm doing a huge refactor of an existing big site and i would like to port > it to symfony. > The problem is that i can't wait to full migrate the site to symfony > framework before going live, but I have to do it step by step, small > integrations and refactors like dailymotion case history. > > What is the best way to achieve that? > With a custom routing class? > With a custom htaccess file? Is the existing site static? If yes, then you can port piece-by-piece by building each section as a module and then drop a controller into the top folder of each section. Basically the symfony tree can be anywhere on your web server (usually its a good idea to keep it outside any web-accessible folder) and your controller loads the config and dispatches the request. You will also need mod_rewrite enabled and htaccess files alongside each controller. Since you already have a site and you dont want to break URLs, then your routing should match the existing site as much as possible. We have done this successfully for a large high traffic site. Just shows how flexible symfony can be. -- -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Set default dsn with env vars?
On Thu, 28 Jan 2010, Tennis Smith wrote: > I'm trying to set my default db based on an environment variable. The > definition looks like this in my databases.yml file: > > test: > foo: > class: sfPropelDatabase > param: > dsn: 'mysql://root:@localhost/test_foo' ?> > > > Should this work? The idea is that if the env var FOO_DB has a value, it > will be used as the dsn. Why do you need to do this? You can have multiple environments in symfony and use multiple controllers to select between them. PHP scripts normally dont run from a shell so most probably environment variables are not available. -- -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Making sure a login id only has one session at any moment
My solution - when I'm not using sfGuard 1. during user login create an unique id (can be session id) and store it to the session[session_id] and to the database to this user row e.g. column login_session 2. every page load you are testing if user is logged - probably testing if some session e.g. session[logged] is true and testing if session[session_id] is the same as the database column login_session - session[logged] is not true - user isn't logged - if session[session_id] isn't equal with login_session - the user logged from another computer (or browser) Of course you haven't to generate a random number and store it to the session[session_id] but simply use the session id. But there comes another little problem when you are using session_regenerate_id() - as protection against Session Fixation. In that case you have to store new session_id to the database every time you regenerate it. On 29 led, 04:43, ken wrote: > This is my solution. > shemahttp://gist.github.com/289418 > > myUserhttp://gist.github.com/289424 > > then insert this filter before the security > filterhttp://gist.github.com/289425 > > On Jan 29, 12:31 am, "yth" wrote: > > > > > Dear ken, > > > Is this possible to avoid modifiying the database schema? > > I am not using sfGuardUserPlugin but I am thinking like this: > > > 1. Somebody logins > > 2. His login id (member id) and password are first checked and they are > > correct > > 3. An attribute member_id is set to his member id in the session > > 4. He forgot to logout and later logins in another computer or same computer > > but different browser > > 5. His login id (member id) and password are first checked and they are > > correct > > 6. Scan for all sessions and check if there is one having member_id > > attribute set to his member id > > 7. If there is one, kill that old session > > 8. A session attribute member_id is set to his member id in the new session > > > Is this solution feasible? But I don't know how to do steps 6-7. > > > - Original Message - > > From: "ken" > > To: "symfony users" > > Sent: Thursday, January 28, 2010 11:15 PM > > Subject: [symfony-users] Re: Making sure a login id only has one session at > > > any moment > > > The best solution for this is use database session. Add session_id > > column in the Profile table. This field has to be set during login. So > > if you are using sfGuardUserPlugin, you can override the signIn method > > in myUser. With the session_id at hand you will be able to check if > > user is signed in in another machine via the Session table. > > > You will also need to take account of the remote host. > > > On Jan 28, 10:15 pm, DEEPAK BHATIA wrote: > > > I think you can set a field in database setting login status to true. > > > Now if the person again logs in and you find from database, you can > > > take him to the logout screen/error screen. > > > > On Thu, Jan 28, 2010 at 7:27 PM, Tom Ptacnik wrote: > > > > Why do you want to kill his old session? > > > > > On 28 led, 04:21, "yth" wrote: > > > >> Dear all, > > > > >> When a user logins, the controller calls the following function in the > > > >> myUser.class. The problem is, if he doesn't logout but then logins in > > > >> another computer/browser, the old session does not get killed. I tried > > > >> to > > > >> use setAuthenticated(false) on users who have already authenticated, > > > >> hoping > > > >> that his old session will get killed before he gets a new one. But it > > > >> doesn't work. > > > > >> Many thanks to you all. > > > > >> // Viewable inhttp://pastebin.com/f765fff66 > > > > >> public function login($loginId,$pwd){ > > > > >> $member=MemberPeer::getByLoginIdAndPassword($loginId,$pwd); > > > > >> if(!is_null($member)) { > > > > >> if($this->isAuthenticated()) > > > >> $this->setAuthenticated(false); // I would like to > > > >> logout the user if he/she already has a session, but it doesn't work > > > > >> $this->setAuthenticated(true); > > > >> $member->setLastLoginAt(time()); > > > >> $member->save(); > > > >> $this->setAttribute('member_id', $member->getMemberId()); > > > > >> return true; > > > >> } > > > >> return false; > > > > >> } > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "symfony users" group. > > > > To post to this group, send email to symfony-us...@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > > symfony-users+unsubscr...@googlegroups.com. > > > > For more options, visit this group > > > > athttp://groups.google.com/group/symfony-users?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "symfony users" group. > > To post to this group, send email to symfony-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/symfony-users?hl=en. > > > __ NOD32 4813
Re: [symfony-users] How to access attributes of a class
Which class and attribute? If its a symfony class there is probably a getter/setter method for it and then that would be the best way. Simple reason why getter/setter methods are better than direct access is that you can then alter the way that variable is returned later (maybe you add additional escaping or bundle it into an array ... who knows?) and therefore your code is much more extensible and maintainable. On Fri, Jan 29, 2010 at 12:16 PM, ruigoncalves wrote: > Hi there! > > How can I access the attributes of a class? By the name of the > attribute or I have to use the appropriate getter/setter? > > Thanks in advance, > Best regards! > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: External user authentication with sfDoctrineGuardPlugin
Of cource you can overwrite the sfGuardAuth module if you don't want to use it... I thought that you want to use both ways of autentification. On 28 led, 18:38, ashton honnecke wrote: > Thanks! > > So if I am understanding you, you are telling me that there is no way > to do this with the current sfGuardUser setup and that I will need to > I create a new module that I use for login. > > It doesn't seem to me that this is an uncommon request related to the > external password check, so It seems odd that I would need to re-write > the login in order to do so. > > Why would I want to make a new module and not just overwrite the > executeSignin method in the BasesfGuardAuthActions class? > > ashton > > > > On Thu, Jan 28, 2010 at 6:53 AM, Tom Ptacnik wrote: > > Create an module with "secure: is_secure: false" in which you can do > > what you want (create a user in sf_guard_user table ...) > > > On 28 led, 02:15, ashton wrote: > >> I have my external authentication working, but the problem that I am > >> running into is that there needs to be a user in the sfGuardUser table > >> that matches the username submit in the login form, otherwise the > >> login fails. > > >> So when I currently add 'return true;' to the top of the external auth > >> function, I can login with any password, for users that exist in the > >> sf_guard_table, but not with usernames that do not exist. > > >> I was wondering if there was a solution out there (ideally user > >> creation in the sfGuardUser table upon successful external > >> authentication), allowing me to perform my external checks even if the > >> username does not exist in the sf_guard_user table would work too, > >> because then I could just manually create the user if the external > >> auth was successful. > > >> thanks! > >> ashton > > > -- > > You received this message because you are subscribed to the Google Groups > > "symfony users" group. > > To post to this group, send email to symfony-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: CheckBox at Server Side
$values = $request->getParameter($this->form->getName()) gets an array with all values of form. And $values['name_of_your_checkbox'] will get the value if checkbox is checked... On 29 Jan., 03:30, mandyllanes wrote: > Hi, > > I have a field checkbox in my form. In de sfAction class I want know > if that field is checked. if my checkbox field is checked i do any > thing, but is not i do another things. How am I can do? > > Many thanks. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: How to access attributes of a class
Using getter/setter is the better coding style.. but if the attributes are public you can access them directly, too. On 29 Jan., 11:16, ruigoncalves wrote: > Hi there! > > How can I access the attributes of a class? By the name of the > attribute or I have to use the appropriate getter/setter? > > Thanks in advance, > Best regards! -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: Definitive guide for 1.3 and 1.4
As it stands right now symfony has W more documentation than any comparable framework out there. I think you are suffering from a case of being spoilt too much by what symfony provides so that anything "removed" is a big deal. I started this discussion not as a complaint but as a query/suggestion as to the usefulness of the Definitive Guide. We really don't need your type in here slandering the hard working guys and girls that make symfony what it is! Hell, I wish MORE open source projects had the kind of dev team symfony has. On Fri, Jan 29, 2010 at 11:19 AM, Skyblaze wrote: > I don't want to spam or to offende anyone i just want to see the > reality. Ok it is an open source project and bla blablabut the > real fact is that this defenitive guide little update (with also two > important chapters left out from the update) and imho a not decent api > documentation won't do anything good for the project. Imho the project > should do a radical change in minds. Bye > > On Jan 25, 7:29 pm, Lukas Kahwe Smith wrote: >> On 25.01.2010, at 19:21, Fabien Potencier wrote: >> >> >> >> > On 1/25/10 7:16 PM, Alexandru-Emil Lupu wrote: >> >> Fabien, there are still 1200+ tickets that not contain plugin in >> >> sumarry, and also the component is not plugins. I even saw a ticket id >> >> like 428 or less >> >> > Feel free to help us reduce this number. >> >> Lets also add the open PHP bugs. >> >> Lets not forget that popularity, especially when providing >> gooddocumentation, invites beginners who tend to file bug reports left and >> right. But unfortunately popularity doesnt generate a proportional number of >> people that do the boring task of weeding through these tickets, setting >> them for "need feedback", "bogus" or handing them off to a good candidate >> for fixing the bug along with a "verified" note. This is also why PHP itself >> has so many bug reports open. >> >> Does that mean that it doesnt matter to get this bug count down? Sure it >> would be awesome. >> Is this cause for alarm, let alone a panic or even put into question the >> development methodology? I think not. >> >> regards, >> Lukas Kahwe Smith >> m...@pooteeweet.org > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Customize sfGuardAuth forms
On 01/29/2010 03:36 AM, MartinB wrote: is there a better place so that I can upgrade the plugin and then not have to make this change again? Yes, you should write it at lib/form/doctrine/sfDoctrineGuardPlugin/sfGuardGroupForm.class.php and /sfGuardGroupPermissionForm. Javi -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: How to make LEFT JOIN in subquery which is in WHERE condition?
Thanks, I think, that I found my mistake. I have to use table alias in LEFT JOIN, like LEFT JOIN ar.Busstops, but I forgot, because it was at 2 AM and was really tired... On Jan 29, 10:51 am, wissl wrote: > Try to use the table names instead of the class names in the subquery. > > On 29 Jan., 00:54, MaEcTPo wrote: > > > > > I wrote a raw SQL, like this: > > > SELECT b2.title, r.title > > FROM route r > > LEFT JOIN busstop_route b ON (r.id = b.route_id) > > LEFT JOIN busstop b2 ON b2.id = b.busstop_id > > WHERE b2.id <> 3 > > AND b.direction_id = > > ( > > SELECT ab.direction_id > > FROM route ar > > LEFT JOIN busstop_route ab ON (ar.id = ab.route_id) > > WHERE ab.busstop_id = 3 > > AND r.id = ar.id > > ); > > > And I would like to write it in DQL. All goes good before subquery. > > > $q = Doctrine_Query::create() > > ->from('Route r'); > > $q->leftJoin('r.Directions d'); > > $q->leftJoin('r.Busstops b'); > > //$q->leftJoin('b.Places'); > > $q->andWhere('b.id <> ?', $this->getId()); > > $q->andWhere('d.id = ( > > SELECT ab.direction_id > > FROM Route ar > > LEFT JOIN Busstops ab ON (ar.id = ab.route_id) > > WHERE ab.busstop_id = 3 > > AND r.id = ar.id > > )', ''); > > > And here I receive strange errors. Symfony talks to me - "Couldn't > > find class Busstops". But it has to find relation busstops (like in > > main query), not class. When I change Busstops to Busstop I receive > > "Unknown relation alias". > > > Do you understand what I need to do? > > > Please, help! -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: Doctrine inheritance and i18n forms
Hi, I'm using sf1.4, doctrine1.2. I have a class and an extending class. Got generated doctrine models and forms, and the extending class's form is inheriting from its super class' form. vsPage inherits vsBasicpage and I get this in the base form class of the vsPage : "abstract class BasevsPageForm extends vsBasicpageForm" Is this what you want ? What is your sf version ? Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Fri, Jan 29, 2010 at 11:34 AM, Thibault Jouannic wrote: > Created the ticket. You can see it here : > > http://trac.symfony-project.org/ticket/8199 > > Regards. > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Doctrine inheritance and i18n forms
Created the ticket. You can see it here : http://trac.symfony-project.org/ticket/8199 Regards. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: Definitive guide for 1.3 and 1.4
On 1/29/10 10:19 AM, Skyblaze wrote: I don't want to spam or to offende anyone i just want to see the reality. Ok it is an open source project and bla blablabut the real fact is that this defenitive guide little update (with also two important chapters left out from the update) and imho a not decent api documentation won't do anything good for the project. Imho the project should do a radical change in minds. Bye Was too fast to send my previous answer. If you have a closer look at the Definitive Guide, you will see that we have done a LOT of changes since the first version for symfony 1.0. Yep, a LOT of changes. We have updated the book with the new features that comes with symfony 1.1 and symfony 1.2. And I'm doing the work for symfony 1.3 and symfony 1.4 right now. What else do you want? I'm quite tired of all these non-sense posts about the symfony documentation. And it has nothing to do with being Open-Source or not. Stop the troll. Thanks. Fabien On Jan 25, 7:29 pm, Lukas Kahwe Smith wrote: On 25.01.2010, at 19:21, Fabien Potencier wrote: On 1/25/10 7:16 PM, Alexandru-Emil Lupu wrote: Fabien, there are still 1200+ tickets that not contain plugin in sumarry, and also the component is not plugins. I even saw a ticket id like 428 or less Feel free to help us reduce this number. Lets also add the open PHP bugs. Lets not forget that popularity, especially when providing gooddocumentation, invites beginners who tend to file bug reports left and right. But unfortunately popularity doesnt generate a proportional number of people that do the boring task of weeding through these tickets, setting them for "need feedback", "bogus" or handing them off to a good candidate for fixing the bug along with a "verified" note. This is also why PHP itself has so many bug reports open. Does that mean that it doesnt matter to get this bug count down? Sure it would be awesome. Is this cause for alarm, let alone a panic or even put into question the development methodology? I think not. regards, Lukas Kahwe Smith m...@pooteeweet.org -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: Definitive guide for 1.3 and 1.4
On 1/29/10 10:19 AM, Skyblaze wrote: I don't want to spam or to offende anyone i just want to see the reality. Ok it is an open source project and bla blablabut the real fact is that this defenitive guide little update (with also two important chapters left out from the update) and imho a not decent api documentation won't do anything good for the project. Imho the project should do a radical change in minds. Bye What are you talking about? There is PLENTY of documentation for symfony 1.3/1.4. Let me reiterate that: PLENTY of documentation. Just have a look at the documentation section on the symfony website. You don't want to read it. I'm fine. Let's move on. Fabien On Jan 25, 7:29 pm, Lukas Kahwe Smith wrote: On 25.01.2010, at 19:21, Fabien Potencier wrote: On 1/25/10 7:16 PM, Alexandru-Emil Lupu wrote: Fabien, there are still 1200+ tickets that not contain plugin in sumarry, and also the component is not plugins. I even saw a ticket id like 428 or less Feel free to help us reduce this number. Lets also add the open PHP bugs. Lets not forget that popularity, especially when providing gooddocumentation, invites beginners who tend to file bug reports left and right. But unfortunately popularity doesnt generate a proportional number of people that do the boring task of weeding through these tickets, setting them for "need feedback", "bogus" or handing them off to a good candidate for fixing the bug along with a "verified" note. This is also why PHP itself has so many bug reports open. Does that mean that it doesnt matter to get this bug count down? Sure it would be awesome. Is this cause for alarm, let alone a panic or even put into question the development methodology? I think not. regards, Lukas Kahwe Smith m...@pooteeweet.org -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] How to access attributes of a class
Hi there! How can I access the attributes of a class? By the name of the attribute or I have to use the appropriate getter/setter? Thanks in advance, Best regards! -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Definitive guide for 1.3 and 1.4
I don't want to spam or to offende anyone i just want to see the reality. Ok it is an open source project and bla blablabut the real fact is that this defenitive guide little update (with also two important chapters left out from the update) and imho a not decent api documentation won't do anything good for the project. Imho the project should do a radical change in minds. Bye On Jan 25, 7:29 pm, Lukas Kahwe Smith wrote: > On 25.01.2010, at 19:21, Fabien Potencier wrote: > > > > > On 1/25/10 7:16 PM, Alexandru-Emil Lupu wrote: > >> Fabien, there are still 1200+ tickets that not contain plugin in > >> sumarry, and also the component is not plugins. I even saw a ticket id > >> like 428 or less > > > Feel free to help us reduce this number. > > Lets also add the open PHP bugs. > > Lets not forget that popularity, especially when providing gooddocumentation, > invites beginners who tend to file bug reports left and right. But > unfortunately popularity doesnt generate a proportional number of people that > do the boring task of weeding through these tickets, setting them for "need > feedback", "bogus" or handing them off to a good candidate for fixing the > bug along with a "verified" note. This is also why PHP itself has so many bug > reports open. > > Does that mean that it doesnt matter to get this bug count down? Sure it > would be awesome. > Is this cause for alarm, let alone a panic or even put into question the > development methodology? I think not. > > regards, > Lukas Kahwe Smith > m...@pooteeweet.org -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Existing site and symfony integration
Hi, I'm doing a huge refactor of an existing big site and i would like to port it to symfony. The problem is that i can't wait to full migrate the site to symfony framework before going live, but I have to do it step by step, small integrations and refactors like dailymotion case history. What is the best way to achieve that? With a custom routing class? With a custom htaccess file? thanks, cirpo -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: How to make LEFT JOIN in subquery which is in WHERE condition?
Try to use the table names instead of the class names in the subquery. On 29 Jan., 00:54, MaEcTPo wrote: > I wrote a raw SQL, like this: > > SELECT b2.title, r.title > FROM route r > LEFT JOIN busstop_route b ON (r.id = b.route_id) > LEFT JOIN busstop b2 ON b2.id = b.busstop_id > WHERE b2.id <> 3 > AND b.direction_id = > ( > SELECT ab.direction_id > FROM route ar > LEFT JOIN busstop_route ab ON (ar.id = ab.route_id) > WHERE ab.busstop_id = 3 > AND r.id = ar.id > ); > > And I would like to write it in DQL. All goes good before subquery. > > $q = Doctrine_Query::create() > ->from('Route r'); > $q->leftJoin('r.Directions d'); > $q->leftJoin('r.Busstops b'); > //$q->leftJoin('b.Places'); > $q->andWhere('b.id <> ?', $this->getId()); > $q->andWhere('d.id = ( > SELECT ab.direction_id > FROM Route ar > LEFT JOIN Busstops ab ON (ar.id = ab.route_id) > WHERE ab.busstop_id = 3 > AND r.id = ar.id > )', ''); > > And here I receive strange errors. Symfony talks to me - "Couldn't > find class Busstops". But it has to find relation busstops (like in > main query), not class. When I change Busstops to Busstop I receive > "Unknown relation alias". > > Do you understand what I need to do? > > Please, help! -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.