Sha256: 1327db946645cb2320473a1e10ddde31304a050ef11f250cf09826e0d48d061e

Contents?: true

Size: 1.89 KB

Versions: 10

Compression:

Stored size: 1.89 KB

Contents

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>authenticate (User)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File app/models/user.rb, line 49</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">authenticate</span>(<span class="ruby-identifier">login</span>, <span class="ruby-identifier">pass</span>)
    <span class="ruby-identifier">u</span> = <span class="ruby-identifier">find</span>(<span class="ruby-identifier">:first</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">&gt;</span> [<span class="ruby-value str">&quot;login = ? AND verified = TRUE AND deleted = FALSE&quot;</span>, <span class="ruby-identifier">login</span>])
    <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">u</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">find</span>(<span class="ruby-identifier">:first</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">&gt;</span> [<span class="ruby-value str">&quot;login = ? AND salted_password = ? AND verified = TRUE&quot;</span>, <span class="ruby-identifier">login</span>, <span class="ruby-identifier">salted_password</span>(<span class="ruby-identifier">u</span>.<span class="ruby-identifier">salt</span>, <span class="ruby-identifier">hashed</span>(<span class="ruby-identifier">pass</span>))])
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

10 entries across 5 versions & 1 rubygems

Version Path
backlog-0.7.10 doc/classes/User.src/M000162.html
backlog-0.7.10 doc/classes/User.src/M000147.html
backlog-0.7.12 doc/classes/User.src/M000162.html
backlog-0.7.12 doc/classes/User.src/M000147.html
backlog-0.7.9 doc/classes/User.src/M000162.html
backlog-0.7.9 doc/classes/User.src/M000147.html
backlog-0.8.0 doc/classes/User.src/M000162.html
backlog-0.8.0 doc/classes/User.src/M000147.html
backlog-0.8.1 doc/classes/User.src/M000162.html
backlog-0.8.1 doc/classes/User.src/M000147.html