[dev] Identity question
Eduardo Dominguez
lalo at teligens.com
Fri Mar 28 11:50:32 PST 2003
Still struggling with the Identity class. I am in need of just _one_
identity, not multiple as is the case with IMP. For what I can tell this
should be straightforward, only one identity can be had per application,
the default identity, unless otherwise specified.
On config/conf.php I have the prefs driver set as 'sql', in this case,
Mysql. In my application's config/prefs.php, I added three preferences
which are to be used by the identity. Seems like this preferences are
used as default values. And testing confirms this.
$_prefs['name'] = array(
'value' => 'No Name',
'locked' => false,
'shared' => true,
'type' => 'implicit');
Now, if I try to modify an identity and save it, it wont work. Even if I
do:
$identity->SetValue('name', 'My Name');
$identity->save();
echo $identity->GetValue('name'); // this prints "My Name"
But in another page where I want to use the identity, if I try to get a
value from it, like the name, I get the default value, which is "No
Name". Changes are not being saved.
What could be causing this ?
Worth mentioning: I derived my own class from Identity and placed it in
the correct place. The class has 'name' as an element in the
$_properties array.
Thanks in advance.
More information about the dev
mailing list