@@ -601,11 +601,11 class User < Principal | |||
|
601 | 601 | end |
|
602 | 602 | |
|
603 | 603 | def self.current=(user) |
|
604 |
|
|
|
604 | Thread.current[:current_user] = user | |
|
605 | 605 | end |
|
606 | 606 | |
|
607 | 607 | def self.current |
|
608 |
|
|
|
608 | Thread.current[:current_user] ||= User.anonymous | |
|
609 | 609 | end |
|
610 | 610 | |
|
611 | 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