Commit 918b16aa authored by Frank Bergmann's avatar Frank Bergmann

- added a more explict error message when displaying a user

  that doesn't exist
parent 8a2065fe
...@@ -94,9 +94,26 @@ where ...@@ -94,9 +94,26 @@ where
u.user_id = :user_id_from_search u.user_id = :user_id_from_search
"] "]
if { $result != 1 } { if { $result > 1 } {
ad_return_complaint "[_ intranet-core.Bad_User]" " ad_return_complaint "[_ intranet-core.Bad_User]" "
<li>[_ intranet-core.lt_We_couldnt_find_user_]" <li>There is more then one user with the ID $user_id_from_search"
return
}
if { $result == 0 } {
set party_id [db_string party "select party_id from parties where party_id=:user_id_from_search" -default 0]
set person_id [db_string person "select person_id from persons where person_id=:user_id_from_search" -default 0]
set user_id [db_string user "select user_id from users where user_id=:user_id_from_search" -default 0]
set object_type [db_string object_type "select object_type from acs_objects where object_id=:user_id_from_search" -default "unknown"]
ad_return_complaint "[_ intranet-core.Bad_User]" "
<li>[_ intranet-core.lt_We_couldnt_find_user_]
<li>ObjectType: $object_type
<li>UserId: $user_id
<li>PersonId: $person_id
<li>PartyId: $party_id
"
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment