@@ -601,11 +601,11 class User < Principal | |||||
601 | end |
|
601 | end | |
602 |
|
602 | |||
603 | def self.current=(user) |
|
603 | def self.current=(user) | |
604 |
|
|
604 | Thread.current[:current_user] = user | |
605 | end |
|
605 | end | |
606 |
|
606 | |||
607 | def self.current |
|
607 | def self.current | |
608 |
|
|
608 | Thread.current[:current_user] ||= User.anonymous | |
609 | end |
|
609 | end | |
610 |
|
610 | |||
611 | # Returns the anonymous user. If the anonymous user does not exist, it is created. There can be only |
|
611 | # Returns the anonymous user. If the anonymous user does not exist, it is created. There can be only |
General Comments 0
You need to be logged in to leave comments.
Login now