application/models/User_model.php
/**
     * Toogles activation of a user record
     * 
     * @param type $user_id
     */
Toogles activation of a user record


Toogles activation of a user record
public function toggle_activation($user_id = null) {
        $user = R::load('user', $user_id);
        $user->active = ($user->active==1 ? 0 : 1);
        R::store($user);
    }
public function toggle_activation ( $ user_id = null ) { $ user = R :: load ( 'user' , $ user_id ) ; $ user -> active = ( $ user -> active == 1 ? 0 : 1 ) ; R :: store ( $ user ) ; }
Toogles activation of a user record
Toogles activation of a user record