diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index 4bca3e07bc4ab0bdfa633922b4868ea79ad70c5c..e7fbc81457b2b67b3903aefd945dd5afa762b09a 100644
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -287,10 +287,6 @@ char *discstr = "!!DISCONNECT!!";
 static char *remote_rig_ft897 = "ft897";
 static char *remote_rig_rbi = "rbi";
 
-#ifdef	OLD_ASTERISK
-STANDARD_LOCAL_USER;
-#endif
-
 #define	MSWAIT 200
 #define	HANGTIME 5000
 #define	TOTIME 180000
diff --git a/include/asterisk/app.h b/include/asterisk/app.h
index 26523d4bd838e6b1461f53bc5e15e2e9833cb3ea..306ae47c239594f7507d5c0220c0c6cee6c24f88 100644
--- a/include/asterisk/app.h
+++ b/include/asterisk/app.h
@@ -394,7 +394,7 @@ struct ast_app_option {
   	... do any argument parsing here ...
 
 	if (ast_parseoptions(my_app_options, &opts, opt_args, options)) {
-		LOCAL_USER_REMOVE(u);
+		ast_module_user_remove(u);
 		return -1;
 	}
   }
diff --git a/include/asterisk/module.h b/include/asterisk/module.h
index 1b257ed157932e74e7a33d556dbd8ea0aee0f99a..ac0fe5dd4e417a71cd821c670f94e25b15f6f92b 100644
--- a/include/asterisk/module.h
+++ b/include/asterisk/module.h
@@ -97,7 +97,7 @@ int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode);
  * This function calulates use counts and notifies anyone trying to keep track
  * of them.  It should be called whenever your module's usecount changes.
  *
- * \note The LOCAL_USER macros take care of calling this function for you.
+ * \note The ast_module_user_* functions take care of calling this function for you.
  */
 void ast_update_use_count(void);
 
diff --git a/res/res_agi.c b/res/res_agi.c
index cf84bb9c38af90504b8c6094f7bd741a5ee4c67c..77e56f5f2ce795f3b9a13b0f42956f7b054488da 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -2457,7 +2457,7 @@ static int agi_exec_full(struct ast_channel *chan, void *data, int enhanced, int
 	 /* Answer if need be */
 	if (chan->_state != AST_STATE_UP) {
 		if (ast_answer(chan)) {
-			LOCAL_USER_REMOVE(u);
+			ast_module_user_remove(u);
 			return -1;
 		}
 	}