includes/class-freemius.php
function _activate_account() {
            if ( $this->is_registered() ) {
                // Already activated.
                return;
            }

            self::_clean_admin_content_section();

            if ( fs_request_is_action( 'activate' ) && fs_request_is_post() ) {
//				check_admin_referer( 'activate_' . $this->_plugin->public_key );

                // Verify matching plugin details.
                if ( $this->_plugin->id != fs_request_get( 'plugin_id' ) || $this->_slug != fs_request_get( 'plugin_slug' ) ) {
                    return;
                }

                $user              = new FS_User();
                $user->id          = fs_request_get( 'user_id' );
                $user->public_key  = fs_request_get( 'user_public_key' );
                $user->secret_key  = fs_request_get( 'user_secret_key' );
                $user->email       = fs_request_get( 'user_email' );
                $user->first       = fs_request_get( 'user_first' );
                $user->last        = fs_request_get( 'user_last' );
                $user->is_verified = fs_request_get_bool( 'user_is_verified' );

                $site             = new FS_Site();
                $site->id         = fs_request_get( 'install_id' );
                $site->public_key = fs_request_get( 'install_public_key' );
                $site->secret_key = fs_request_get( 'install_secret_key' );
                $site->plan_id    = fs_request_get( 'plan_id' );

                $plans      = array();
                $plans_data = json_decode( urldecode( fs_request_get( 'plans' ) ) );
                foreach ( $plans_data as $p ) {
                    $plan = new FS_Plugin_Plan( $p );
                    if ( $site->plan_id == $plan->id ) {
                        $plan->title = fs_request_get( 'plan_title' );
                        $plan->name  = fs_request_get( 'plan_name' );
                    }

                    $plans[] = $plan;
                }

                $this->_set_account( $user, $site, $plans );

                // Reload the page with the keys.
                fs_redirect( $this->_get_admin_page_url() );
            }
        }
function _activate_account() {
            if ( $this->is_registered() ) {
                // Already activated.
                return;
            }

            self::_clean_admin_content_section();

            if ( fs_request_is_action( 'activate' ) && fs_request_is_post() ) {
//				check_admin_referer( 'activate_' . $this->_plugin->public_key );

                // Verify matching plugin details.
                if ( $this->_plugin->id != fs_request_get( 'plugin_id' ) || $this->_slug != fs_request_get( 'plugin_slug' ) ) {
                    return;
                }

                $user              = new FS_User();
                $user->id          = fs_request_get( 'user_id' );
                $user->public_key  = fs_request_get( 'user_public_key' );
                $user->secret_key  = fs_request_get( 'user_secret_key' );
                $user->email       = fs_request_get( 'user_email' );
                $user->first       = fs_request_get( 'user_first' );
                $user->last        = fs_request_get( 'user_last' );
                $user->is_verified = fs_request_get_bool( 'user_is_verified' );

                $site             = new FS_Site();
                $site->id         = fs_request_get( 'install_id' );
                $site->public_key = fs_request_get( 'install_public_key' );
                $site->secret_key = fs_request_get( 'install_secret_key' );
                $site->plan_id    = fs_request_get( 'plan_id' );

                $plans      = array();
                $plans_data = json_decode( urldecode( fs_request_get( 'plans' ) ) );
                foreach ( $plans_data as $p ) {
                    $plan = new FS_Plugin_Plan( $p );
                    if ( $site->plan_id == $plan->id ) {
                        $plan->title = fs_request_get( 'plan_title' );
                        $plan->name  = fs_request_get( 'plan_name' );
                    }

                    $plans[] = $plan;
                }

                $this->_set_account( $user, $site, $plans );

                // Reload the page with the keys.
                fs_redirect( $this->_get_admin_page_url() );
            }
        }
function _activate_account ( ) { if ( $ this -> is_registered ( ) ) { // Already activated.
 return ; } self :: _clean_admin_content_section ( ) ; if ( fs_request_is_action ( 'activate' ) && fs_request_is_post ( ) ) { //				check_admin_referer( 'activate_' . $this->_plugin->public_key );
 // Verify matching plugin details.
 if ( $ this -> _plugin -> id != fs_request_get ( 'plugin_id' ) || $ this -> _slug != fs_request_get ( 'plugin_slug' ) ) { return ; } $ user = new FS_User ( ) ; $ user -> id = fs_request_get ( 'user_id' ) ; $ user -> public_key = fs_request_get ( 'user_public_key' ) ; $ user -> secret_key = fs_request_get ( 'user_secret_key' ) ; $ user -> email = fs_request_get ( 'user_email' ) ; $ user -> first = fs_request_get ( 'user_first' ) ; $ user -> last = fs_request_get ( 'user_last' ) ; $ user -> is_verified = fs_request_get_bool ( 'user_is_verified' ) ; $ site = new FS_Site ( ) ; $ site -> id = fs_request_get ( 'install_id' ) ; $ site -> public_key = fs_request_get ( 'install_public_key' ) ; $ site -> secret_key = fs_request_get ( 'install_secret_key' ) ; $ site -> plan_id = fs_request_get ( 'plan_id' ) ; $ plans = array ( ) ; $ plans_data = json_decode ( urldecode ( fs_request_get ( 'plans' ) ) ) ; foreach ( $ plans_data as $ p ) { $ plan = new FS_Plugin_Plan ( $ p ) ; if ( $ site -> plan_id == $ plan -> id ) { $ plan -> title = fs_request_get ( 'plan_title' ) ; $ plan -> name = fs_request_get ( 'plan_name' ) ; } $ plans [ ] = $ plan ; } $ this -> _set_account ( $ user , $ site , $ plans ) ; // Reload the page with the keys.
 fs_redirect ( $ this -> _get_admin_page_url ( ) ) ; } }
Tries to activate account based on POST params.

@author     Vova Feldman (@svovaf)
@since      1.0.2

@deprecated Not in use, outdated.
Tries to activate account based on POST params .