Here is a summary of what I did in the code for forget
password feature:

 - Add a passwordRequestCode field to
org.apache.roller.pojos.UserData (and also rolleruser
table)

 - Add a getUserByPasswordRequestCode method in
org.apache.roller.business.UserManager and implemented
 in
org.apache.roller.business.hibernate.HibernateUserManagerImpl

 - Add
org.apache.roller.ui.core.struts2.ForgetPassword class
that contains forgetpassword related actions;
    forgetPassword action: To generate and send a
password request code to the user via email if given
username and emailAddress matched. 
    sendNewPassword action: To generate and send a new
password to the user, related with the
passwordRequestCode, via email

 - Add 2 methods (sendPasswordRequestCode and
sendUserNewPassword) in
org.apache.roller.util.MailUtil

 - Add web/web-inf/jsps/core/struts2/
ForgetPassword.jsp to get username and user email
address for forgetPassword:forgetpassword action
 (also web-inf/tiles.xml and
web-inf/classes/struts.xml updated)

 - Add a link to the ForgetPasword.jsp in
web/web-inf/jsps/core/struts2/Login.jsp

 - Add related messages in Application.properties

 - Add user.password.mail.from property in
rollerRuntimeConfigDefs.xml so that the from part in
the sent mail of forget password related mails can be
set.

 That's all,
 Sedat Çiftçi


--- sedat ciftci <[EMAIL PROTECTED]> wrote:

> Here is updated patch which uses only struts 2
> actions: 
>
http://www.jroller.com/resources/s/sedat/forgetPasswordPatchRollerTrunk20070520ver3.jar
> 
> In this patch, I add 2 new files:
> org.apache.roller.ui.core.struts2.ForgetPassword and
> its corresponding jsp page
> web-inf/jsps/core/struts2/ForgetPassword.jsp
> 
>   Sedat
>    
> 
> --- sedat ciftci <[EMAIL PROTECTED]> wrote:
> 
> > Ok. When I write the forget password patch, I do
> not
> > write any struts2 actions; I write my actions in
> >
>
org.apache.roller.ui.core.struts.actions.UserNewAction
> > (struts1) and it works. Then, they have to be
> moved
> > to
> > a struts2 action class, don't they?
> >   Sedat
> > 
> > --- Allen Gilliland <[EMAIL PROTECTED]>
> wrote:
> > 
> > > All the struts1 actions are effectively EOLed as
> > far
> > > as I'm concerned, 
> > > so we aren't going to fix any problems in that
> > > class.  As long as the 
> > > register action is correct then that's fine.
> > > 
> > > -- Allen
> > > 
> > > 
> > > sedat ciftci wrote:
> > > > Here is the updated patch for the forget
> > password
> > > > feature: 
> > > >
> > >
> >
>
http://www.jroller.com/resources/s/sedat/forgetPasswordPatchRollerTrunk20070520ver2.jar
> > > > 
> > > > (change the extension of the file from .jar to
> > > .zip to
> > > > open file)
> > > > 
> > > > Note: While I updating this patch (for current
> > > trunk),
> > > > I notice that in the add method of
> > > >
> > >
> >
>
org.apache.roller.ui.core.struts.actions.UserNewAction,
> > > > the property related with the user activation
> > via
> > > > email  is read from RollerConfig (boolean
> > > > activationEnabled =
> > > >
> > >
> >
>
RollerConfig.getBooleanProperty("user.account.activation.enabled");
> > > > ). This must be read from RollerRuntimeConfig
> as
> > > it is
> > > > writen in save method of
> > > > org.apache.roller.ui.core.struts2.Register
> > > (boolean
> > > > activationEnabled =
> > > >
> > >
> >
>
RollerRuntimeConfig.getBooleanProperty("user.account.activation.enabled");)
> > > > 
> > > > Sedat
> > > > 
> > > > --- sedat ciftci <[EMAIL PROTECTED]>
> wrote:
> > > > 
> > > >> I put a property in RollerRunTime Config and
> I
> > > just
> > > >> notice that in order to read that property, I
> > > have
> > > >> to
> > > >> use RollerRuntimeConfig.getProperty() method
> (I
> > > used
> > > >> RollerConfig.getProperty() method). I will
> > update
> > > >> the
> > > >> patch, resend it and notify you.
> > > >>   Sedat
> > > >>
> > > >> --- Dave <[EMAIL PROTECTED]> wrote:
> > > >>
> > > >>> Cool! That's great news Sedat.
> > > >>>
> > > >>> I'll try to find some time this week to take
> a
> > > >> look
> > > >>> at the patch.
> > > >>>
> > > >>> Thanks,
> > > >>> - Dave
> > > >>>
> > > >>>
> > > >>>
> > > >>> On 5/20/07, sedat ciftci
> > <[EMAIL PROTECTED]>
> > > >>> wrote:
> > > >>>> Hello,
> > > >>>>
> > > >>>>   With this new feature, when a user
> forgets
> > > >>> his/her
> > > >>>> password, he/she enters the user name and
> > email
> > > >>>> address of his/her account. If those values
> > are
> > > >>>> matched, then a password request mail is
> sent
> > > to
> > > >>> the
> > > >>>> user to confirm this password request. If
> > user
> > > >>> clicks
> > > >>>> the link in this sent mail, a new password
> is
> > > >>>> generated randomly and sent to the user.
> > > >>>>
> > > >>>>   I wrote the patch related with this
> feature
> > > >> for
> > > >>>> current roller trunk and you can download
> it
> > > >> from
> > > >>> this
> > > >>>> link:
> > > >>>>
> > > >
> > >
> >
>
http://www.jroller.com/resources/s/sedat/forgetPasswordPatchRollerTrunk20070520ver1.jar
> > > >>>> (change the extension of the file from .jar
> > to
> > > >>> .zip to
> > > >>>> open)
> > > >>>>
> > > >>>>   Sedat
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >
> > >
> >
>
____________________________________________________________________________________Get
> > > >>> the Yahoo! toolbar and be alerted to new
> email
> > > >>> wherever you're surfing.
> > > >
> > >
> >
>
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php
> > > >>
> > > >>
> > > >>        
> > > >>
> > > >
> > >
> >
>
____________________________________________________________________________________Choose
> > > >> the right car based on your needs.  Check out
> > > Yahoo!
> > > >> Autos new Car Finder tool.
> > > >> http://autos.yahoo.com/carfinder/
> > > >>
> > > > 
> > > > 
> > > > 
> > > >      
> > >
> >
>
____________________________________________________________________________________Fussy?
> > > Opinionated? Impossible to please? Perfect. 
> Join
> > > Yahoo!'s user panel and lay it on us.
> > >
> >
>
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
> > > 
> > > > 
> > > 
> > 
> > 
> 
=== message truncated ===



       
____________________________________________________________________________________Yahoo!
 oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

Reply via email to