Jonathan H. Wage schrieb:
> Frank,
>
> I added the e-mail address to the user table for the forgot password
> functionality, but I think someone rolled back the changes and was going
> to implement the forgot password and register functionality as different
> plugins?
>
> If we remove the e-mail column from the user table, do you have any
> suggestions on the best way to implement it?
>
> I am willing to work on this and fix it, but I am not sure of the best
> way to implement it yet.
>
> - Jon
>
> Franke Gordon wrote:
>
>> hello,
>>
>> for the plugin sfGuardPlugin there is a todo to implement a
>> getPassword method?
>>
>> So i have make a workflow for a project that the user can reqest a
>> password change and get a e-mail with a md5 hash to a site at this he
>> can change his password.
>>
>> I use a email field for that and this ist he problem. Readme say:
>>
>> The sfAuthUser model is quite simple. There is no email or first_name
>> or birthday columns.
>>
>> but in the plugin (lib/user/ sfGuardSecurityUser.class.php) there is a
>> function for get email?
>>
>> So the next thing is that when we implement this we can also implement
>> a register function (same way like forgot password).
>>
>> And last but not least.
>>
>> http://www.symfony-project.com/snippets/snippet/170
>>
>> this is a simple way to extends the plugin with a foreign key ;) so i
>> would implement this into the readme?
>>
>> When yes can i remove the other way? I think this is problematic for
>> other plugins and projects ;(
>>
>> greetings
>>
>> Gordon
>>
>>
>>
>
> >
>
at the moment i have implement it as follow:
schema.yml:
propel:
_attributes : { package: "plugins.sfGuardPlugin.lib.model" }
sf_guard_user:
_attributes: { phpName: sfGuardUser }
id:
propel:
sf_guard_request:
_attributes: { phpName: sfGuardRequest }
user_id: { type: integer, primaryKey: true, foreignTable: sf_guard_user,
foreignReference: id, onDelete: cascade }
request_key: { type: varchar(32), index: unique }
type: { type: varchar(8), index: index }
sf_guard_user_profile:
_attributes: { phpName: sfUserProfile }
user_id: { type: integer, primaryKey: true, foreignTable: sf_guard_user,
foreignReference: id, onDelete: cascade }
advertise_by: { type: integer, foreignTable: sf_guard_user,
foreignReference: id, onDelete: cascade }
email: { type: varchar(64), required: true, index: unique }
so the registration and forgot password create a request key like that
and send a email to the user:
key: md5(time()+rand(1, 1000)); // for batch creation i add the rand method
type: register|password
i use these workflows:
registration -> email link -> success
password forgot -> email link -> form new password -> success
so we can make it as a sfGuardUserProfilePlugin.
Another thing is that i will make the schema flexible to add additional
fields (see schema manipulation in sfSimpleBlogPlugin).
What do you think about that?
greetings
Gordon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---