Hi,
I'm trying to insert default user, but I got several errors. Here is my code
// Create default user
User* user = new User();
// Assign user defaults
user->id = UUID::generate();
user->description = "root";
// Add user to DB
Globe::mySession()->add(user);
// Create new AuthInfo
AuthInfo* auth = new AuthInfo();
auth->setPassword("$2y$07$Qw22YzLmQCTLZSDmaRfmb.h5tVG7wWaTr43RGd0rWazeCIgTz9vcy",
"bcrypt",
"K.8kShHEMmAhq8ht");
// Set the user
-> auth->setUser(user);
// add authInfo to DB
Globe::mySession()->add(auth);
Auth::Dbo::AuthIdentity<AuthInfo>* authId = new
Auth::Dbo::AuthIdentity<AuthInfo>("loginname", "root");
auth->authIdentities().insert(authId);
I tryed to call auth->setUser(user); before add authInfo to DB but it
didn't work and after it and it didn't work too. I don't know where is the
problem.
Thanks a lot,
Muhammad Nasser Al-Noimi
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest