Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Commit

Permalink
Log user id when registrating
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Olde Hampsink committed Nov 4, 2014
1 parent 570a8dc commit 0a24ea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/AuditLog_UserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function log()
$log = new AuditLogRecord();

// Set user id
$log->userId = craft()->userSession->getUser()->id;
$log->userId = craft()->userSession->getUser() ? craft()->userSession->getUser()->id : $user->id;

// Set element type
$log->type = ElementType::User;
Expand Down

0 comments on commit 0a24ea0

Please sign in to comment.