diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index cf1f888..795a2e8 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -6,6 +6,7 @@
     <original-package android:name="com.android.settings" />
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
     <uses-permission android:name="android.permission.DEVICE_POWER" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index fb236b3..e070131 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -4065,4 +4065,9 @@
     <string name="help_url_backup_reset" translatable="false"></string>
     <!-- Help URL, Tethering [DO NOT TRANSLATE] -->
     <string name="help_url_tether" translatable="false"></string>
+    
+    <!-- User account title [CHAR LIMIT=30] -->
+    <string name="user_account_title">Account for content</string>
+    <!-- User picture title [CHAR LIMIT=30] -->
+    <string name="user_picture_title">Photo ID</string>
 </resources>
diff --git a/res/xml/settings_headers.xml b/res/xml/settings_headers.xml
index 2089bac..96ce0f1 100644
--- a/res/xml/settings_headers.xml
+++ b/res/xml/settings_headers.xml
@@ -106,13 +106,6 @@
     <!-- PERSONAL -->
     <header android:title="@string/header_category_personal" />
 
-    <!-- Manage users -->
-    <header
-        android:fragment="com.android.settings.users.UserSettings"
-        android:icon="@drawable/ic_settings_sync"
-        android:title="@string/user_settings_title"
-        android:id="@+id/user_settings" />
-
     <!-- Location -->
     <header
         android:fragment="com.android.settings.LocationSettings"
@@ -146,6 +139,13 @@
             android:id="@+id/account_settings"
             android:title="@string/account_settings" />
 
+    <!-- Manage users -->
+    <header
+        android:fragment="com.android.settings.users.UserSettings"
+        android:icon="@drawable/ic_settings_sync"
+        android:title="@string/user_settings_title"
+        android:id="@+id/user_settings" />
+
     <header
             android:id="@+id/account_add"
             android:title="@string/add_account_label"
diff --git a/res/xml/user_details.xml b/res/xml/user_details.xml
index 257eee4..616c628 100644
--- a/res/xml/user_details.xml
+++ b/res/xml/user_details.xml
@@ -26,11 +26,22 @@
                 android:title="@string/user_name_title"
                 android:persistent="false"
                 />
+        <Preference
+                android:key="user_picture"
+                android:title="@string/user_picture_title"
+                android:persistent="false"
+                />
     </PreferenceCategory>
 
     <PreferenceCategory
             android:key="restrictions_category"
             android:title="@string/user_restrictions_heading">
+        <Preference
+                android:key="associated_account"
+                android:title="@string/user_account_title"
+                android:enabled="false"
+                android:persistent="false"
+                />
         <CheckBoxPreference
                 android:key="market_requires_pin"
                 android:title="@string/user_market_requires_pin"
diff --git a/src/com/android/settings/users/UserDetailsSettings.java b/src/com/android/settings/users/UserDetailsSettings.java
index 84cabe9..2a8c29c 100644
--- a/src/com/android/settings/users/UserDetailsSettings.java
+++ b/src/com/android/settings/users/UserDetailsSettings.java
@@ -16,6 +16,7 @@
 
 package com.android.settings.users;
 
+import android.app.Activity;
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.content.DialogInterface;
@@ -26,12 +27,14 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.content.pm.UserInfo;
+import android.graphics.Bitmap;
+import android.graphics.Bitmap.CompressFormat;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
 import android.os.Bundle;
+import android.os.ParcelFileDescriptor;
 import android.os.RemoteException;
 import android.os.ServiceManager;
-import android.os.SystemProperties;
 import android.preference.CheckBoxPreference;
 import android.preference.EditTextPreference;
 import android.preference.Preference;
@@ -50,7 +53,8 @@
 import java.util.List;
 
 public class UserDetailsSettings extends SettingsPreferenceFragment
-        implements Preference.OnPreferenceChangeListener, DialogCreatable {
+        implements Preference.OnPreferenceChangeListener, DialogCreatable,
+                   Preference.OnPreferenceClickListener {
 
     private static final String TAG = "UserDetailsSettings";
 
@@ -58,15 +62,16 @@
     private static final int DIALOG_CONFIRM_REMOVE = 1;
 
     private static final String KEY_USER_NAME = "user_name";
+    private static final String KEY_USER_PICTURE = "user_picture";
     private static final String KEY_INSTALLED_APPS = "market_apps_category";
     private static final String KEY_SYSTEM_APPS = "system_apps_category";
+    private static final String KEY_ACCOUNT = "associated_account";
+    private static final String KEY_RESTRICTIONS = "restrictions_category";
+
     public static final String EXTRA_USER_ID = "user_id";
 
-    private static final String[] SYSTEM_APPS = {
-            "com.google.android.browser",
-            "com.google.android.gm",
-            "com.google.android.youtube"
-    };
+    private static final int RESULT_PICK_IMAGE = 1;
+    private static final int RESULT_CROP_IMAGE = 2;
 
     static class AppState {
         boolean dirty;
@@ -81,6 +86,8 @@
     private PreferenceGroup mSystemAppGroup;
     private PreferenceGroup mInstalledAppGroup;
     private EditTextPreference mNamePref;
+    private Preference mPicturePref;
+    private Preference mAccountPref;
 
     private IPackageManager mIPm;
     private PackageManager mPm;
@@ -106,7 +113,16 @@
         mInstalledAppGroup = (PreferenceGroup) findPreference(KEY_INSTALLED_APPS);
         mNamePref = (EditTextPreference) findPreference(KEY_USER_NAME);
         mNamePref.setOnPreferenceChangeListener(this);
+        mPicturePref = findPreference(KEY_USER_PICTURE);
+        mPicturePref.setOnPreferenceClickListener(this);
+        mAccountPref = findPreference(KEY_ACCOUNT);
+        mAccountPref.setOnPreferenceClickListener(this);
 
+        if (mUserId == 0) {
+            getPreferenceScreen().removePreference(mSystemAppGroup);
+            getPreferenceScreen().removePreference(mInstalledAppGroup);
+            getPreferenceScreen().removePreference(findPreference(KEY_RESTRICTIONS));
+        }
         setHasOptionsMenu(true);
     }
 
@@ -114,7 +130,7 @@
     public void onResume() {
         super.onResume();
         mPm = getActivity().getPackageManager();
-        if (mUserId > 0) {
+        if (mUserId >= 0) {
             initExistingUser();
         } else {
             initNewUser();
@@ -124,6 +140,9 @@
 
     @Override
     public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+        if (mUserId == 0) {
+            return;
+        }
         MenuItem addAccountItem = menu.add(0, MENU_REMOVE_USER, 0,
                 mNewUser ? R.string.user_discard_user_menu : R.string.user_remove_user_menu);
         addAccountItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM
@@ -153,6 +172,9 @@
         if (foundUser != null) {
             mNamePref.setSummary(foundUser.name);
             mNamePref.setText(foundUser.name);
+            if (foundUser.iconPath != null) {
+                setPhotoId(foundUser.iconPath);
+            }
         }
     }
 
@@ -200,6 +222,7 @@
     }
 
     private void refreshApps() {
+        if (mUserId == 0) return;
         mSystemAppGroup.removeAll();
         mInstalledAppGroup.removeAll();
 
@@ -254,7 +277,7 @@
                 return false;
             }
             try {
-                mIPm.updateUserName(mUserId, (String) newValue);
+                mIPm.setUserName(mUserId, (String) newValue);
                 mNamePref.setSummary((String) newValue);
             } catch (RemoteException re) {
                 return false;
@@ -282,4 +305,72 @@
                 return null;
         }
     }
+
+    @Override
+    public boolean onPreferenceClick(Preference preference) {
+        if (preference == mAccountPref) {
+//            Intent launch = AccountManager.newChooseAccountsIntent(null, null, new String[]{"com.google"}, false, null,
+//                    null, null, null);
+        } else if (preference == mPicturePref) {
+            Intent intent = new Intent();
+            intent.setType("image/*");
+            intent.setAction(Intent.ACTION_GET_CONTENT);
+
+            startActivityForResult(intent, RESULT_PICK_IMAGE);
+        }
+        return false;
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        if (resultCode != Activity.RESULT_OK) {
+            return;
+        }
+        switch (requestCode) {
+        case RESULT_PICK_IMAGE:
+            if (data.getData() != null) {
+                Uri imageUri = data.getData();
+                System.err.println("imageUri = " + imageUri);
+                cropImage(imageUri);
+            }
+            break;
+        case RESULT_CROP_IMAGE:
+            saveCroppedImage(data);
+            break;
+        }
+    }
+
+    private void cropImage(Uri imageUri) {
+        final Uri inputPhotoUri = imageUri;
+        Intent intent = new Intent("com.android.camera.action.CROP");
+        intent.setDataAndType(inputPhotoUri, "image/*");
+        intent.putExtra("crop", "true");
+        intent.putExtra("aspectX", 1);
+        intent.putExtra("aspectY", 1);
+        intent.putExtra("outputX", 96);
+        intent.putExtra("outputY", 96);
+        intent.putExtra("return-data", true);
+        startActivityForResult(intent, RESULT_CROP_IMAGE);
+    }
+
+    private void saveCroppedImage(Intent data) {
+        try {
+            if (data.hasExtra("data")) {
+                Bitmap bitmap = (Bitmap) data.getParcelableExtra("data");
+                ParcelFileDescriptor fd = mIPm.setUserIcon(mUserId);
+                if (fd != null) {
+                    bitmap.compress(CompressFormat.PNG, 100,
+                            new ParcelFileDescriptor.AutoCloseOutputStream(fd));
+                    setPhotoId(mPm.getUser(mUserId).iconPath);
+                }
+            }
+        } catch (RemoteException re) {
+        }
+    }
+
+    private void setPhotoId(String realPath) {
+        Drawable d = Drawable.createFromPath(realPath);
+        if (d == null) return;
+        mPicturePref.setIcon(d);
+    }
 }
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java
index 9380586..d32cb45 100644
--- a/src/com/android/settings/users/UserSettings.java
+++ b/src/com/android/settings/users/UserSettings.java
@@ -17,6 +17,7 @@
 package com.android.settings.users;
 
 import android.content.pm.UserInfo;
+import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.preference.Preference;
 import android.preference.Preference.OnPreferenceClickListener;
@@ -83,15 +84,23 @@
 
         mUserListCategory.removeAll();
         for (UserInfo user : users) {
-            if (user.id == 0) continue;
             Preference pref = new Preference(getActivity());
             pref.setTitle(user.name);
             pref.setOnPreferenceClickListener(this);
             pref.setKey("id=" + user.id);
+            if (user.iconPath != null) {
+                setPhotoId(pref, user.iconPath);
+            }
             mUserListCategory.addPreference(pref);
         }
     }
 
+    private void setPhotoId(Preference pref, String realPath) {
+        Drawable d = Drawable.createFromPath(realPath);
+        if (d == null) return;
+        pref.setIcon(d);
+    }
+
     @Override
     public boolean onPreferenceClick(Preference pref) {
         String sid = pref.getKey();
