solution: merging various changes
- combines API violation fixes, asset and certificate changes, and the
adding of qrcode dependency
Change-Id: I0d26c589fabef3b6c46bac19bf6bc0d0adfe76f1
Tuleap: #1234
diff --git a/UserModel.cpp b/UserModel.cpp
new file mode 100644
index 0000000..b17caee
--- /dev/null
+++ b/UserModel.cpp
@@ -0,0 +1,28 @@
+#include "pch.h"
+
+#include "UserModel.h"
+
+using namespace RingClientUWP;
+
+void
+UserModel::getUserData()
+{
+ create_task(User::FindAllAsync())
+ .then([=](IVectorView<User^>^ users) {
+ for (size_t index = 0; index < users->Size; index++) {
+ auto user = users->GetAt(index);
+ if (user->AuthenticationStatus == UserAuthenticationStatus::LocallyAuthenticated &&
+ user->Type == UserType::LocalUser) {
+ User^ currentUser = user;
+ create_task(currentUser->GetPropertyAsync(KnownUserProperties::FirstName))
+ .then([=](Object^ result) {
+ firstName = safe_cast<String^>(result);
+ });
+ create_task(currentUser->GetPropertyAsync(KnownUserProperties::LastName))
+ .then([&](Object^ result) {
+ lastName = safe_cast<String^>(result);
+ });
+ }
+ }
+ });
+}
\ No newline at end of file