Title: Deprecated Functions
Last modified: February 20, 2020

---

# Deprecated Functions

 *  [thebarkacademy](https://wordpress.org/support/users/thebarkacademy/)
 * (@thebarkacademy)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/deprecated-functions-25/)
 * Since create_function is deprecated, can anyone help me fix the following code?
 *  static function track_detailed_user_activity() {
    add_action(‘password_reset’,
   create_function(‘$user’, ‘ WP_CRM_F::insert_event(array(“object_id”=> $user->
   ID, “attribute” => “detailed_log”, “other” => 5, “action” => “password_reset”));‘));
   add_action(‘wp_login’, **create_function**(‘$user_login’, ‘ $user = get_user_by(“
   login”, $user_login); WP_CRM_F::insert_event(array(“object_id”=> $user->ID, “
   attribute” => “detailed_log”, “other” => 2, “action” => “login”)); ‘)); }

The topic ‘Deprecated Functions’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-crm_c36510.svg)
 * [WP-CRM - Customer Relations Management for WordPress](https://wordpress.org/plugins/wp-crm/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-crm/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-crm/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-crm/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-crm/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-crm/reviews/)

## Tags

 * [create_function](https://wordpress.org/support/topic-tag/create_function/)
 * [deprecated functions](https://wordpress.org/support/topic-tag/deprecated-functions/)

 * 0 replies
 * 1 participant
 * Last reply from: [thebarkacademy](https://wordpress.org/support/users/thebarkacademy/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/deprecated-functions-25/)
 * Status: not resolved