##// END OF EJS Templates
Create and assign the api token so the current instance can access it. (#4497)...
Eric Davis -
r3151:4b3d4553e438
parent child
Show More
@@ -196,7 +196,7 class User < Principal
196
196
197 # Return user's API key (a 40 chars long string), used to access the API
197 # Return user's API key (a 40 chars long string), used to access the API
198 def api_key
198 def api_key
199 token = self.api_token || Token.create(:user => self, :action => 'api')
199 token = self.api_token || self.create_api_token(:action => 'api')
200 token.value
200 token.value
201 end
201 end
202
202
General Comments 0
You need to be logged in to leave comments. Login now