Browse Source

Fix gravatar email update #951

causefx 7 years ago
parent
commit
fe665e072b
2 changed files with 2 additions and 0 deletions
  1. 1 0
      api/functions/api-functions.php
  2. 1 0
      api/functions/organizr-functions.php

+ 1 - 0
api/functions/api-functions.php

@@ -560,6 +560,7 @@ function adminEditUser($array)
                         UPDATE users SET', [
 						'username' => $array['data']['username'],
 						'email' => $array['data']['email'],
+						'image' => gravatar($array['data']['email']),
 					], '
                         WHERE id=?', $array['data']['id']);
 					if (!empty($array['data']['password'])) {

+ 1 - 0
api/functions/organizr-functions.php

@@ -300,6 +300,7 @@ function editUser($array)
                 UPDATE users SET', [
 				'username' => $array['data']['username'],
 				'email' => $array['data']['email'],
+				'image' => gravatar($array['data']['email']),
 			], '
                 WHERE id=?', $GLOBALS['organizrUser']['userID']);
 			if (!empty($array['data']['password'])) {