Skip to content
This repository
Browse code

Fixes #2468: Deprecated call_gatekeeper() and callpath_gatekeeper()

git-svn-id: http://code.elgg.org/elgg/trunk@7369 36083f99-b078-4883-b0ff-0f9b5a30f544
  • Loading branch information...
commit 863c7044a223d101b29e630d048d0f53580f4096 1 parent 9f41e8b
Evan Winslow authored November 20, 2010
10  engine/lib/elgglib.php
@@ -1335,9 +1335,11 @@ function elgg_deprecated_notice($msg, $dep_version) {
1335 1335
  * @param string $file     Optional file that the function must reside in.
1336 1336
  *
1337 1337
  * @return bool
1338  
- * @todo This is neat but is it necessary?
  1338
+ * 
  1339
+ * @deprecated 1.8 A neat but pointless function
1339 1340
  */
1340 1341
 function call_gatekeeper($function, $file = "") {
  1342
+	elgg_deprecated_notice("call_gatekeeper() is neat but pointless", 1.8);
1341 1343
 	// Sanity check
1342 1344
 	if (!$function) {
1343 1345
 		return false;
@@ -1401,11 +1403,13 @@ function call_gatekeeper($function, $file = "") {
1401 1403
  *                                called by something on $path, if false the whole call stack is
1402 1404
  *                                searched.
1403 1405
  *
1404  
- * @todo Again, very neat, but is it necessary?
1405  
- *
1406 1406
  * @return void
  1407
+ * 
  1408
+ * @deprecated 1.8 A neat but pointless function
1407 1409
  */
1408 1410
 function callpath_gatekeeper($path, $include_subdirs = true, $strict_mode = false) {
  1411
+	elgg_deprecated_notice("callpath_gatekeeper() is neat but pointless", 1.8);
  1412
+	
1409 1413
 	global $CONFIG;
1410 1414
 
1411 1415
 	$path = sanitise_string($path);
18  engine/lib/users.php
@@ -889,19 +889,17 @@ function send_new_password_request($user_guid) {
889 889
 function force_user_password_reset($user_guid, $password) {
890 890
 	global $CONFIG;
891 891
 
892  
-	if (call_gatekeeper('execute_new_password_request', __FILE__)) {
893  
-		$user = get_entity($user_guid);
  892
+	$user = get_entity($user_guid);
894 893
 
895  
-		if ($user) {
896  
-			$salt = generate_random_cleartext_password(); // Reset the salt
897  
-			$user->salt = $salt;
  894
+	if ($user) {
  895
+		$salt = generate_random_cleartext_password(); // Reset the salt
  896
+		$user->salt = $salt;
898 897
 
899  
-			$hash = generate_user_password($user, $password);
  898
+		$hash = generate_user_password($user, $password);
900 899
 
901  
-			$query = "UPDATE {$CONFIG->dbprefix}users_entity
902  
-				set password='$hash', salt='$salt' where guid=$user_guid";
903  
-			return update_data($query);
904  
-		}
  900
+		$query = "UPDATE {$CONFIG->dbprefix}users_entity
  901
+			set password='$hash', salt='$salt' where guid=$user_guid";
  902
+		return update_data($query);
905 903
 	}
906 904
 
907 905
 	return false;

0 notes on commit 863c704

Please sign in to comment.
Something went wrong with that request. Please try again.