57 private $compare_attributes = array();
61 private $identity = array();
71 foreach (array(
'class') as $param) {
72 if (isset($extra_args[$param])) {
73 $this->$param = $extra_args[$param];
75 throw new KumbiaException(
"Debe especificar el parámetro '$param' en los parámetros");
78 unset($extra_args[0]);
79 unset($extra_args[
'class']);
80 $this->compare_attributes = $extra_args;
89 return $this->identity;
99 $where_condition = array();
100 foreach ($this->compare_attributes as $field => $value) {
101 $value = addslashes($value);
102 $where_condition[] =
"$field = '$value'";
104 $result =
Load::model($this->
class)->count(join(
" AND ", $where_condition));
108 foreach ($model->fields as $field) {
112 if (!in_array($field, array(
'password',
'clave',
'contrasena',
'passwd',
'pass'))) {
113 $identity[$field] = $model->$field;
116 $this->identity = $identity;
128 foreach (array(
'server',
'secret',
'principal',
'password',
'port',
'max_retries') as $param) {
129 if (isset($extra_args[$param])) {
130 $this->$param = $extra_args[$param];