Index: trunk/grails-app/services/TaskService.groovy
===================================================================
--- trunk/grails-app/services/TaskService.groovy	(revision 181)
+++ trunk/grails-app/services/TaskService.groovy	(revision 182)
@@ -4,5 +4,5 @@
 
     def dateUtilService
-    def authenticateService
+    def personService
 
     def create(params) {
@@ -14,10 +14,6 @@
             result.taskInstance = taskInstance
 
-            // Get person in a safe way to avoid a null userDomain during bootstrap.
-            def userDomain = authenticateService.userDomain()
-            def person = userDomain ? Person.get(userDomain.id) : Person.get(1)
-
             if(taskInstance.save()) {
-                def taskModification = new TaskModification(person:person,
+                def taskModification = new TaskModification(person: personService.currentUser(),
                                                         taskModificationType: TaskModificationType.get(1),
                                                         task: taskInstance)
@@ -64,5 +60,5 @@
 
                 if(result.taskInstance.save()) {
-                    def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id),
+                    def taskModification = new TaskModification(person:personService.currentUser(),
                                                             taskModificationType: TaskModificationType.get(3),
                                                             task: result.taskInstance)
@@ -107,5 +103,5 @@
 
                 if(result.taskInstance.save()) {
-                    def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id),
+                    def taskModification = new TaskModification(person:personService.currentUser(),
                                                             taskModificationType: TaskModificationType.get(4),
                                                             task: result.taskInstance)
@@ -150,5 +146,5 @@
 
                 if(result.taskInstance.save()) {
-                    def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id),
+                    def taskModification = new TaskModification(person:personService.currentUser(),
                                                             taskModificationType: TaskModificationType.get(5),
                                                             task: result.taskInstance)
@@ -193,5 +189,5 @@
 
                 if(result.taskInstance.save()) {
-                    def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id),
+                    def taskModification = new TaskModification(person:personService.currentUser(),
                                                             taskModificationType: TaskModificationType.get(6),
                                                             task: result.taskInstance)
@@ -236,5 +232,5 @@
 
                 if(result.taskInstance.save()) {
-                    def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id),
+                    def taskModification = new TaskModification(person:personService.currentUser(),
                                                             taskModificationType: TaskModificationType.get(7),
                                                             task: result.taskInstance)
@@ -279,5 +275,5 @@
 
                 if(result.taskInstance.save()) {
-                    def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id),
+                    def taskModification = new TaskModification(person:personService.currentUser(),
                                                             taskModificationType: TaskModificationType.get(8),
                                                             task: result.taskInstance)
@@ -322,5 +318,5 @@
 
                 if(result.taskInstance.save()) {
-                    def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id),
+                    def taskModification = new TaskModification(person:personService.currentUser(),
                                                             taskModificationType: TaskModificationType.get(9),
                                                             task: result.taskInstance)
