public function create($data, $user_role = 'Guest')
 {
     $security = $this->getDI()->get('security');
     if (isset($data['user_acl_role'])) {
         $user_role = $data['user_acl_role'];
     }
     $user = new User();
     $user->setUserFirstName($data['user_first_name']);
     $user->setUserLastName($data['user_last_name']);
     $user->setUserEmail($data['user_email']);
     $user->setUserPassword($security->hash($data['user_password']));
     $user->setUserIsActive($data['user_is_active']);
     $o_acl_role = AclRoles::findFirstByName($user_role);
     if (!$o_acl_role) {
         throw new \Exception("Role {$user_role} does not exist");
     }
     $o_user_role = array();
     $o_user_role[0] = new UserRole();
     $o_user_role[0]->setUserRole($user_role);
     $user->roles = $o_user_role;
     $profile = new UserProfile();
     $profile->setUserProfileLocation($data['user_profile_location']);
     $user->profile = $profile;
     return $this->save($user);
 }