]> source.dussan.org Git - redmine.git/commitdiff
Merged r3265 from trunk
authorEric Davis <edavis@littlestreamsoftware.com>
Wed, 30 Dec 2009 00:26:48 +0000 (00:26 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Wed, 30 Dec 2009 00:26:48 +0000 (00:26 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3266 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/user.rb

index 39fdb165a80639627db9dd177217cb2b4a8066ee..8a69fda00b444182d0d7203a8f0f24ae8ff300a0 100644 (file)
@@ -196,7 +196,7 @@ class User < Principal
 
   # Return user's API key (a 40 chars long string), used to access the API
   def api_key
-    token = self.api_token || Token.create(:user => self, :action => 'api')
+    token = self.api_token || self.create_api_token(:action => 'api')
     token.value
   end