package com.twu.biblioteca.view;

import com.twu.biblioteca.CurrentUser;
import com.twu.biblioteca.model.User;

/**
 * Created by David on 11.06.17.
 */
public class UserFormatter {

    public String formatUserInfo() {
        final User currentUser = CurrentUser.getCurrentUser();
        if (currentUser == null) {
            return "Please log in to access your user information\n";
        } else {
            return "ID: " + currentUser.getUserId() + ", name: " + currentUser.getName() + ", email: " +
                    currentUser.getEmail() + ", address: " + currentUser.getAddress() + ", phone: " + currentUser.getPhoneNumber() + "\n";
        }
    }
}
