Commit 4b3d4553 authored by Eric Davis's avatar Eric Davis

Create and assign the api token so the current instance can access it. (#4497)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3265 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent c67cc7c2
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment