[Building Sakai] Import available users from a file to Sakai

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Wed May 13 09:01:21 PDT 2009


Hi Phuc,

It's the UserDirectoryService for creating user accounts. This would  
be a good enhancement to the existing Admin User's tool, to be able to  
create accounts in bulk. Would be good to extend that if possible.

Here's the Javadocs for 2.5.4:
http://source.sakaiproject.org/release/2.5.4/apidocs/

Find UserDirectoryService (the org.sakaiproject.user.api one) in the  
list and check out it's methods. You want the addUser() method. Note  
that the first parameter, the id, can be null and it will be  
autogenerated, which is generally what you want so you get the UUID.

Either that or have your users in LDAP, hook it up to Sakai and you  
don't need to do anything, their accounts will be mapped automatically  
when they first login.


cheers,
Steve

---
Steve Swinsburg
Portal Systems Developer
Centre for e-Science
Lancaster University
Lancaster
LA1 4YT

email: s.swinsburg at lancaster.ac.uk
phone: +44 (0) 1524 594870







On 13 May 2009, at 16:51, Phuc Bui wrote:

> Dear Steve,
> I would like to develop a tool in Sakai so that users can have a  
> view to create users.
> My problem is that: every year, when students enter university, I  
> will have the data of them, then I will make these students as  
> Sakai’s users.
> So would you tell me which API to do this J
> Thanks,
> Phuc Bui
>
> From: Steve Swinsburg [mailto:s.swinsburg at lancaster.ac.uk]
> Sent: Wednesday, May 13, 2009 7:10 PM
> To: Phuc Bui
> Cc: sakai-dev at collab.sakaiproject.org
> Subject: Re: [Building Sakai] Import available users from a file to  
> Sakai
>
> Hi Phuc,
>
> Best to use the API. You can use the web services to iterate over a  
> file and create user accounts.
>
> I've attached a (crude) Perl script and a sample CSV file.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090513/d7df5b17/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090513/d7df5b17/attachment.bin 


More information about the sakai-dev mailing list