[Building Sakai] External User search in Sakai

Jaco Gillman jaco at opencollab.co.za
Mon Jul 9 03:37:30 PDT 2012


Hi Steve

I have had a look at the logs and results from the SQL scripts. Here is the
log entry for the SQL script that ran for the name search in the Users tool:

2012-07-09 12:32:19,053 [http-127.0.0.1-8080-2] u:/d: DEBUG
org.sakaiproject.db.impl.BasicSqlService :: prepareStatement(PreparedS
tatement com.mysql.jdbc.JDBC4PreparedStatement at 799eace3: select
SAKAI_USER.USER_ID,SAKAI_USER.EMAIL,SAKAI_USER.EMAIL_LC,SAKAI_USER
.FIRST_NAME,SAKAI_USER.LAST_NAME,SAKAI_USER.TYPE,SAKAI_USER.PW
,SAKAI_USER.CREATEDBY,SAKAI_USER.MODIFIEDBY,SAKAI_USER.CREATEDON,SAK
AI_USER.MODIFIEDON from SAKAI_USER,SAKAI_USER_ID_MAP where
SAKAI_USER.USER_ID = SAKAI_USER_ID_MAP.USER_ID AND (SAKAI_USER.USER_ID
= ** NOT SPECIFIED ** OR UPPER(EID) LIKE UPPER(** NOT SPECIFIED **) OR
EMAIL_LC LIKE ** NOT SPECIFIED ** OR UPPER(FIRST_NAME) LIKE
 UPPER(** NOT SPECIFIED **) OR UPPER(LAST_NAME) LIKE UPPER(** NOT SPECIFIED
**)) order by SAKAI_USER_ID_MAP.EID,SAKAI_USER.LAST_NA
ME,SAKAI_USER.FIRST_NAME limit 2147483647 offset 0, Object[] [jaco, %jaco%,
%jaco%, %jaco%, %jaco%])

Looking at this SQL I then queried Tables SAKAI_USER and SAKAI_USER_ID_MAP
and found these result:


[image: Inline images 1]


[image: Inline images 2]

The original SQL used the following filter:
SAKAI_USER.USER_ID = SAKAI_USER_ID_MAP.USER_ID

This is the reason why I don't see any search results. "Jaco" is a user I
added in Sakai manually.

Regards,

*Jaco Gillman***

Java Developer

opencollab

*Tel*: +27 21 970 4017  |  *Fax*:* *+27 21 914 3098**

*Email*: jaco at opencollab.co.za  |  *Skype*: gillmanjc

*Web*: www.opencollab.co.za




On 6 July 2012 14:54, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:

> Hi Jaco,
>
> Cn you enable debug level logging for org.sakaiproject.user and then rerun
> the search and see if you can spot anything in the logs?
>
> Cheers,
> Steve
>
> Sent from my iPad
>
> On 06/07/2012, at 15:39, Jaco Gillman <jaco at opencollab.co.za> wrote:
>
> Hi Steve
>
> Yes we have implemented a LDAP integration but that's about it. Also we
> have the following property in sakai.properties:
>
> separateIdEid at org.sakaiproject.user.api.UserDirectoryService=false
>
> Not sure what exactly this property is used for.
>
> Regards,
>
> *Jaco Gillman***
>
> Java Developer
>
> opencollab
>
> *Tel*: +27 21 970 4017  |  *Fax*:* *+27 21 914 3098**
>
> *Email*: jaco at opencollab.co.za  |  *Skype*: gillmanjc
>
> *Web*: www.opencollab.co.za
>
>
>
>
> On 6 July 2012 07:10, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
>
>> Hi Jaco,
>>
>> That's odd. It works fine on nightly 2.8.x, have you any local
>> modifications? Also, do the logs show anything interesting?
>> http://nightly2.sakaiproject.org:8081/portal
>>
>> cheers,
>> Steve
>>
>>
>> On 06/07/2012, at 2:53 PM, Jaco Gillman wrote:
>>
>> Hi Steve
>>
>> I have added these screen shots you have requested. I have also tried 3
>> different user searches and none of them is found in the search.
>>
>> <image.png>
>>
>>
>>
>>
>>
>> <image.png>
>>
>> <image.png>
>>
>> <image.png>
>>
>>
>>
>>
>> Regards,
>>
>> *Jaco Gillman***
>> *
>> *
>> Java Developer
>> opencollab
>> *Tel*: +27 21 970 4017  |  *Fax*:* *+27 21 914 3098**
>> *Email*: jaco at opencollab.co.za  |  *Skype*: gillmanjc
>> *Web*: www.opencollab.co.za
>>
>>
>>
>>
>>
>>
>>
>>
>> On 6 July 2012 06:41, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
>>
>>> Hi Jaco,
>>>
>>> Do you mean the Admin users tool? That should search all internal users.
>>> Could you perhaps send a screenshot of the search result, and then another
>>> without any search term so we can see what the normal list looks like?
>>>
>>> thanks,
>>> Steve
>>>
>>>
>>> On 06/07/2012, at 2:11 PM, Jaco Gillman wrote:
>>>
>>> Hi Bryan
>>> This "user" tool search does not even bring back any results for
>>> internal users that we have added manually. Any ideas around what this
>>> might be? We have installed Sakai 2.8.2.
>>>
>>>
>>>
>>> Regards,
>>>
>>> *Jaco Gillman***
>>> Java Developer
>>> opencollab
>>> *Tel*: +27 21 970 4017  |  *Fax*:* *+27 21 914 3098**
>>> *Email*: jaco at opencollab.co.za  |  *Skype*: gillmanjc
>>> *Web*: www.opencollab.co.za
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 5 July 2012 18:30, Bryan Holladay <holladay at longsight.com> wrote:
>>>
>>>> The membership tool uses this search and will return the information
>>>> for you.  The "users" tool is for internal users only.
>>>>
>>>> -Bryan
>>>>
>>>> On Thu, Jul 5, 2012 at 12:12 PM, Jaco Gillman <jaco at opencollab.co.za>
>>>> wrote:
>>>> > Thanks for the reply Bryan.
>>>> >
>>>> > I saw an example of what you mention below online, but is it at all
>>>> possible
>>>> > for Sakai to do external searches "out-of-the-box"? I would like to
>>>> log in
>>>> > with a Admin user, and do a search on external users using the Users
>>>> tool
>>>> > performing a normal user search functionality.
>>>> >
>>>> > Regards,
>>>> >
>>>> > Jaco Gillman
>>>> >
>>>> > Java Developer
>>>> >
>>>> > opencollab
>>>> >
>>>> > Tel: +27 21 970 4017  |  Fax: +27 21 914 3098
>>>> >
>>>> > Email: jaco at opencollab.co.za  |  Skype: gillmanjc
>>>> >
>>>> > Web: www.opencollab.co.za
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > On 5 July 2012 18:06, Bryan Holladay <holladay at longsight.com> wrote:
>>>> >>
>>>> >> Theres a separate function for external (ldap) users:
>>>> >>
>>>> >> userDirectoryService.searchExternalUsers(search, -1, -1)
>>>> >>
>>>> >> On Thu, Jul 5, 2012 at 12:02 PM, Jaco Gillman <jaco at opencollab.co.za
>>>> >
>>>> >> wrote:
>>>> >> > Hi All
>>>> >> >
>>>> >> > I am having difficulty doing users searches in Sakai. We have an
>>>> LDAP
>>>> >> > integration implementation.
>>>> >> >
>>>> >> > Are there any sakai.properties settings that I need to be aware of
>>>> to
>>>> >> > accomplish external user searches in Sakai?
>>>> >> >
>>>> >> > Regards,
>>>> >> >
>>>> >> > Jaco Gillman
>>>> >> >
>>>> >> > Java Developer
>>>> >> >
>>>> >> > opencollab
>>>> >> >
>>>> >> > Tel: +27 21 970 4017  |  Fax: +27 21 914 3098
>>>> >> >
>>>> >> > Email: jaco at opencollab.co.za  |  Skype: gillmanjc
>>>> >> >
>>>> >> > Web: www.opencollab.co.za
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > _______________________________________________
>>>> >> > sakai-dev mailing list
>>>> >> > sakai-dev at collab.sakaiproject.org
>>>> >> > http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>> >> >
>>>> >> > TO UNSUBSCRIBE: send email to
>>>> >> > sakai-dev-unsubscribe at collab.sakaiproject.org
>>>> >> > with a subject of "unsubscribe"
>>>> >
>>>> >
>>>>
>>>
>>> _______________________________________________
>>> sakai-dev mailing list
>>> sakai-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>
>>> TO UNSUBSCRIBE: send email to
>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>> "unsubscribe"
>>>
>>>
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120709/11bc1b48/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 29994 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120709/11bc1b48/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 22652 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120709/11bc1b48/attachment-0001.png 


More information about the sakai-dev mailing list