What I’m thinking of is that the authentication and authorization will be on an independent library in order to abstract it from the users, customers or admin logic (user_model - user_controller, customer_model - customer_controller etc etc) but I’m having a difficulty on designing how to code this.
]]>We have a need to sync user name and member information on two separate servers. One installation is on our server and the other is on the clients.
Is there a way to sync the member information only from one database to the next?
Also, what are the security issues with just having the clients EE installation reference our database remotely since we can just use Multi-Site Manager.
Thoughts? Solutions?
Any assistance would be greatly appreciated.
Best regards,
Troy Kadavy
92 West
+1 in the thread if you would be interested in a 1 (or 2) day workshop here in the UK to get a hands on tutorial of how to do this.
Can you also mention your nearest city too and if there is anything specific you would want to know.
Thanks
Tim
EEvolution
I’m using CodeIgniter 2.0.3,
newest HMVC from bitbucket
ion_auth 2.0.4
Then I make a controller which load ion_auth:
$this->load->spark('ion_auth/2.0.4');
$ion_auth = $this->ion_auth;
I got this error:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Welcome::$ion_auth
Filename: controllers/welcome.php
Line Number: 33
I’ve also try to debug,.... and stucked at line 5 of third_party/MX/Module.php (http://getsparks.org/static/install/mx/Modules.php.txt)
if(!defined('SPARKPATH'))
{
define('SPARKPATH', APPPATH.'sparks/');
}
the SPARKPATH would be “application/sparks”, I know it should actually refer to “sparks”. I tried to fixed it, but the error still occurred.
I think it is not ion_auth problem, since I’ve try to make my own spark, and got the same result.
Is there anybody with the same problem?
Or is there anybody with a success story of doing this?
PS:
I’m using ubuntu 10.10, there is no reason to have a wrong extention file as someone using windows with hidden extension,.....
Thanks
]]>
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: query
Filename: controllers/welcome.php
Line Number: 42
My code is simple
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Welcome extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see http://codeigniter.com/user_guide/general/urls.html
*/
public function index()
{
if (isset($_GET)) {
echo json_encode($this->get_all());
}
//$this->load->view('welcome_message');
echo 'test';
}
// will use contacts database to not create aditional
private function get_all() {
$this->load->database();
$sql = "SELECT name as brand, address as color, tel as max_speed FROM contacts";
print_r($this->db);
$this->db->query($sql);
return $query->result_array();
}
}
and when print $this->db here is result
CI_DB_mysql_driver Object
(
[dbdriver] => mysql
[_escape_char] => `
[_like_escape_str] =>
[_like_escape_chr] =>
[delete_hack] => 1
[_count_string] => SELECT COUNT(*) AS
[_random_keyword] => RAND()
[use_set_names] =>
[ar_select] => Array
(
)[ar_distinct] =>
[ar_from] => Array
(
)[ar_join] => Array
(
)[ar_where] => Array
(
)[ar_like] => Array
(
)[ar_groupby] => Array
(
)[ar_having] => Array
(
)[ar_keys] => Array
(
)[ar_limit] =>
[ar_offset] =>
[ar_order] =>
[ar_orderby] => Array
(
)[ar_set] => Array
(
)[ar_wherein] => Array
(
)[ar_aliased_tables] => Array
(
)[ar_store_array] => Array
(
)[ar_caching] =>
[ar_cache_exists] => Array
(
)[ar_cache_select] => Array
(
)[ar_cache_from] => Array
(
)[ar_cache_join] => Array
(
)[ar_cache_where] => Array
(
)[ar_cache_like] => Array
(
)[ar_cache_groupby] => Array
(
)[ar_cache_having] => Array
(
)[ar_cache_orderby] => Array
(
)[ar_cache_set] => Array
(
)[ar_no_escape] => Array
(
)[ar_cache_no_escape] => Array
(
)[username] => root
[password] =>
[hostname] => localhost
[database] => backbone_contacts_manager
[dbprefix] =>
[char_set] => utf8
[dbcollat] => utf8_general_ci
[autoinit] => 1
[swap_pre] =>
[port] =>
[pconnect] => 1
[conn_id] => Resource id #28
[result_id] =>
[db_debug] => 1
[benchmark] => 0
[query_count] => 0
[bind_marker] => ?
[save_queries] => 1
[queries] => Array
(
)[query_times] => Array
(
)[data_cache] => Array
(
)[trans_enabled] => 1
[trans_strict] => 1
[_trans_depth] => 0
[_trans_status] => 1
[cache_on] =>
[cachedir] =>
[cache_autodel] =>
[CACHE] =>
[_protect_identifiers] => 1
[_reserved_identifiers] => Array
(
[0] => *
)[stmt_id] =>
[curs_id] =>
[limit_used] =>
[stricton] =>
)
I don’t get at all how this cannot work when it is working evrywhere? I also loeaded database in autoload file.
I discovered this while working with a Safecracker-style form (specifically, using profile:edit). Because of the nature of all the custom fields contained in my profile channel, it was necessary for me to get ridiculously specific with the form fields, and set them up in tag pairs, and not the { custom_fields } loop. Doing so increased the chances that I made a template boo-boo that resulted in the Disallowed Key Characters error when I attempted to submit the Safecracker form.
Now that I’ve discovered the issue—a stray curly brace inside one of the form elements—I have a strategy for finding those nasty little disallowed keys easier the next time. Here, internets and eecms devs, I offer it to you, in case it helps save you some time.
1. View Source for the rendered template with the Safecracker form in it.
2. Do a search in the view source for curly brackets. { and }
3. If any show up inside the form tags, say, at the beginning or end of the ID or NAME property, you found your culprit.
<textarea id="custom_field_name" name="custom_field_name}">{custom_field_name}</textarea>
Hint: if your eyes are glazing over this example, look more closely at the end of the name= property.
This technique beats the heck out of creating a separate template and running the reliable safecracker custom_fields tag pair, especially when the total count of custom fields is something in the dozens.
]]>1) I haven’t heard of EE
2) EE seems expensive
3) EE isn’t open-source
Those familiar concerns can be addressed successfully, depending on the individuals involved on the client’s end.
But sometimes EE can be overruled simply because an IT manager up the ladder blocks the selection of EE simply because of the 3 points above.
Opening this up to the community, what successes (or constructive failures) do you have to share in light of these objections?
]]>