Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4ba76412
authored
Aug 21, 2012
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create a new EventUser from existing user if it exists.
1 parent
344933a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PermissionBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PermissionBean.java
View file @
4ba7641
...
@@ -182,13 +182,19 @@ public class PermissionBean implements PermissionBeanLocal {
...
@@ -182,13 +182,19 @@ public class PermissionBean implements PermissionBeanLocal {
public
EventUser
getAnonEventUser
()
{
public
EventUser
getAnonEventUser
()
{
EventUser
defaultUser
=
eventUserFacade
.
findByLogin
(
User
.
ANONYMOUS_LOGINNAME
);
EventUser
defaultUser
=
eventUserFacade
.
findByLogin
(
User
.
ANONYMOUS_LOGINNAME
);
if
(
defaultUser
==
null
)
{
if
(
defaultUser
==
null
)
{
User
user
=
userfacade
.
findByLogin
(
User
.
ANONYMOUS_LOGINNAME
);
defaultUser
=
new
EventUser
(
new
User
(),
eventbean
.
getCurrentEvent
());
if
(
user
==
null
)
defaultUser
.
setLogin
(
User
.
ANONYMOUS_LOGINNAME
);
{
defaultUser
.
setNick
(
User
.
ANONYMOUS_LOGINNAME
);
defaultUser
=
new
EventUser
(
new
User
(),
eventbean
.
getCurrentEvent
());
defaultUser
.
setLogin
(
User
.
ANONYMOUS_LOGINNAME
);
defaultUser
.
setNick
(
User
.
ANONYMOUS_LOGINNAME
);
}
else
{
defaultUser
=
new
EventUser
(
user
,
eventbean
.
getCurrentEvent
());
}
eventUserFacade
.
create
(
defaultUser
);
eventUserFacade
.
create
(
defaultUser
);
eventUserFacade
.
flush
();
eventUserFacade
.
flush
();
}
}
return
defaultUser
;
return
defaultUser
;
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment