Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

179 Posts in 40 Topics by 84 members

Migrating a Site to Silverstripe

SilverStripe Forums » Migrating a Site to Silverstripe » MIgrating users

What you need to know when migrating your existing site to SilverStripe.

Page: 1
Go to End
Author Topic: MIgrating users 947 Views
  • Jarek
    avatar
    Community Member
    14 posts

    MIgrating users Link to this post

    Hello

    How can I add new user from php code? Normally member data are set by calling $form->saveinto($obj). What is the other way to fill member obejct? I have users in file (csv) and I don't know how to do this.

    Thx for any help

  • Sigurd
    avatar
    Core Development Team
    624 posts

    Use PHP... Link to this post

    You will need to write PHP to import this for the moment, or SQL, or use the newsletter import and migrate people over as members.

    I've added a feature request for what you want, tho: http://open.silverstripe.com/ticket/3303

  • Willr
    avatar
    Moderator
    2744 posts

    Re: MIgrating users Link to this post

    You can create members in PHP by going $member = new Member(); then to save the member you just need to call write() on it to write it to the database.

    As for the csv import tool you should look on the net for example code but the SS specific stuff is pretty easy.

    $member = new Member();
    $member->FirstName = "First Name Here";
    $member->Surname = "Surname";
    // ... you can do Email, or any other fields on member
    $member->write(); // save the member

    947 Views
Page: 1
Go to Top

Currently Online: There is nobody online.

Welcome to our latest member: Newclear

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.