]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #2468: Deprecated call_gatekeeper() and callpath_gatekeeper()
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 20 Nov 2010 08:36:32 +0000 (08:36 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 20 Nov 2010 08:36:32 +0000 (08:36 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7369 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/elgglib.php
engine/lib/users.php

index cf3d25822d0a9af8c0145d02ad6608ddc70db88d..fb7a4578b978440ec046f18d1e4c65fe7a4b2de5 100644 (file)
@@ -1335,9 +1335,11 @@ function elgg_deprecated_notice($msg, $dep_version) {
  * @param string $file     Optional file that the function must reside in.
  *
  * @return bool
- * @todo This is neat but is it necessary?
+ * 
+ * @deprecated 1.8 A neat but pointless function
  */
 function call_gatekeeper($function, $file = "") {
+       elgg_deprecated_notice("call_gatekeeper() is neat but pointless", 1.8);
        // Sanity check
        if (!$function) {
                return false;
@@ -1401,11 +1403,13 @@ function call_gatekeeper($function, $file = "") {
  *                                called by something on $path, if false the whole call stack is
  *                                searched.
  *
- * @todo Again, very neat, but is it necessary?
- *
  * @return void
+ * 
+ * @deprecated 1.8 A neat but pointless function
  */
 function callpath_gatekeeper($path, $include_subdirs = true, $strict_mode = false) {
+       elgg_deprecated_notice("callpath_gatekeeper() is neat but pointless", 1.8);
+       
        global $CONFIG;
 
        $path = sanitise_string($path);
index 62f2bdcc87af553f07bc7c3f53a8b66e5e81dc25..9ed3d086395e7be3095e27e1ad012cadcf4e78d6 100644 (file)
@@ -889,19 +889,17 @@ function send_new_password_request($user_guid) {
 function force_user_password_reset($user_guid, $password) {
        global $CONFIG;
 
-       if (call_gatekeeper('execute_new_password_request', __FILE__)) {
-               $user = get_entity($user_guid);
+       $user = get_entity($user_guid);
 
-               if ($user) {
-                       $salt = generate_random_cleartext_password(); // Reset the salt
-                       $user->salt = $salt;
+       if ($user) {
+               $salt = generate_random_cleartext_password(); // Reset the salt
+               $user->salt = $salt;
 
-                       $hash = generate_user_password($user, $password);
+               $hash = generate_user_password($user, $password);
 
-                       $query = "UPDATE {$CONFIG->dbprefix}users_entity
-                               set password='$hash', salt='$salt' where guid=$user_guid";
-                       return update_data($query);
-               }
+               $query = "UPDATE {$CONFIG->dbprefix}users_entity
+                       set password='$hash', salt='$salt' where guid=$user_guid";
+               return update_data($query);
        }
 
        return false;