How to create a change password web form and send email noti

Hi all

I am looking for a web page or application that will allow an user to change his/her database password. I am thinking about a web form where end users enter the current password and the new password, hit submit and the new password replaces the old one. Then the web form sends an email notification

The database is an Oracle 10G database.

Is there any RoR project that does that?


simple version from one of our apps:


attr_accessor :password_confirmation attr_protected :password, :password_confirmation

validates_confirmation_of :password, :message => "the passwords don't match"


<%= error_messages_for(:login) if @login %><br />

<div class="acc_new">   <% form_for(@login, :url => update_login_members_path) do %>     <fieldset>       <legend>Inloggegevens</legend>       <label>Gebruikersnaam:</label><%= h(@login.user_name) %><br /

<br />

      <%= label(:login, :password, "* Wachtwoord:") %><%= password_field(:login, :password, :size => 40) %>&nbsp;(minimaal 6 tekens) <br />       <%= label(:login, :password_confirmation, "* Wachtwoord 2:") %>< %= password_field(:login, :password_confirmation, :size => 40) %>&nbsp; (minimaal 6 tekens)<br />     </fieldset>     <%= submit_tag 'Wijzigen' %>   <% end %> </div>


  def update_login     @login = current_login     @login.password = params[:login][:password]     @login.password_confirmation = params[:login] [:password_confirmation]

    if @login.update_attributes(params[:login])       flash[:notice] = 'Uw inlog gegevens zijn geupdate.'

    # here would go your code to send an email

    end     render :action => 'edit_login'   end

anything missing?

Thorsten Mueller,

Does it work with Oracle?


To use the mailing list define your problem better. okz? When the details and scope of the question has quality the answer may me too.

To create a project to use oracle database engine, do it:

rails --database=oracle project_name

To add/delete users you’ll need to study something like:

UserController << ApplicationController

def create @user =[:user])

        render :text => 'tasks completed'
        render :text => 'try again'

end end

At migration file:

class CreateUser < ActiveRecord::Migration def self.up t.column :name, :string t.column :surname, :string, :string t.timestamps end

def self.down

   drop_tables :users

end end

At user.rb

class User << ActiveRecord::Base validates_presence_of :name, :surname, :email validates_uniqueness_of :email validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})$/i


At app/view/user/index.html.erb

<% form_for :user do |form| %>

<%= form.text_field :email %> <%= form.text_field :name %> <%= form.text_field :surname %>

<%= submit_tag ‘send’ %>

<% end %>

Now you can see the form at: http://localhost:3000/user/create

This is the very basic flow to add new users. Google for something like it and learn :wink:


I'm using this: