Show More
@@ -148,6 +148,11 b' def action_logger(user, action, repo, ip' | |||||
148 |
|
148 | |||
149 | if not sa: |
|
149 | if not sa: | |
150 | sa = meta.Session() |
|
150 | sa = meta.Session() | |
|
151 | # if we don't get explicit IP address try to get one from registered user | |||
|
152 | # in tmpl context var | |||
|
153 | from pylons import tmpl_context | |||
|
154 | if not ipaddr and hasattr(tmpl_context, 'rhodecode_user'): | |||
|
155 | ipaddr = tmpl_context.rhodecode_user.ip_addr | |||
151 |
|
156 | |||
152 | try: |
|
157 | try: | |
153 | if hasattr(user, 'user_id'): |
|
158 | if hasattr(user, 'user_id'): |
General Comments 0
You need to be logged in to leave comments.
Login now