Class: Fcid::User
- Defined in:
- app/models/fcid/user.rb
Class Method Summary collapse
- .authenticate(username_or_email, password) ⇒ Object
-
.authenticate_by_auth_token(token) ⇒ Object
通过auto_token来验证用户,成功返回用户,失败返回 false.
- .columns ⇒ Object
- .config ⇒ Object
- .sub_domain?(domain) ⇒ Boolean
Instance Method Summary collapse
Class Method Details
.authenticate(username_or_email, password) ⇒ Object
24 25 26 |
# File 'app/models/fcid/user.rb', line 24 def self.authenticate(username_or_email,password) get(:authenticate,:email=>username_or_email,:password=>password) end |
.authenticate_by_auth_token(token) ⇒ Object
通过auto_token来验证用户,成功返回用户,失败返回 false
19 20 21 22 |
# File 'app/models/fcid/user.rb', line 19 def self.authenticate_by_auth_token(token) user = get(:info,:token=>token) rsync(user['username']) end |
Instance Method Details
#avatar(style = "thumb") ⇒ Object
33 34 35 |
# File 'app/models/fcid/user.rb', line 33 def avatar(style = "thumb") avatar_url end |