<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in 'Validating passwords on User model?' | Pragmatic Forums</title>
    <link>http://65.74.171.210/forums/22/topics/281</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <item>
      <title>Validating passwords on User model? posted by Jeff Sharpe @ Fri, 29 Feb 2008 17:08:13 -0000</title>
      <description>&lt;p&gt;The method shown in the 2nd edition book, to validate users via passwords and storing them in the db securely, is great.  I think this use case is perfect if users manage their own data.&lt;/p&gt;


	&lt;p&gt;Using this method, I added a way for administrators to edit users &amp;#8211; or when I want to manipulate the User data via migrations &amp;#8211; but unless I (re)set the password and password_confirmation the validations run (and update fails).  I remove the validation, resets the password to &amp;#8221;&amp;#8221; values.&lt;/p&gt;


	&lt;p&gt;I thought of adding a :if =&amp;gt; {something} to the validations &amp;#8211; but have not come up with something that works through all use-cases.&lt;/p&gt;


	&lt;p&gt;Anyone else hit this problem?&lt;/p&gt;</description>
      <pubDate>Fri, 29 Feb 2008 17:08:13 -0000</pubDate>
      <guid isPermaLink="false">65.74.171.210:22:281:2350</guid>
      <author>Jeff Sharpe</author>
      <link>http://65.74.171.210/forums/22/topics/281</link>
    </item>
  </channel>
</rss>
