What file is Zend_Registry in

I am trying to figure out what file the class Zend_Registry is in.

Can anyone tell me?

libs/Zend/Registry.php

ahhhh thanks!

hmm I still can’t find what I am looking for I hope someone can help.

What I am looking for is where is this function defined:

Zend_Registry::get(‘access’)->reloadAccess();

All I need to know is how to reload auth tokens once I manually add a user.

core/Access.php

Thanks for your help.

That leads me to a dead in too.

Here is my problem…I wrote a shell script to add users to the database

But when I do that no one can login.

I am pretty sure I have the token auth hash the same way adduser() does the only thing different my shell script does is than adduser() does is the line with Zend_Registry::get(‘access’)->reloadAccess(); in adduser.

So what is Piwik doing to add a new user that I am not?

Besides the fact that you’re doing it the hard way, there’s the possibility we’ll change how passwords and tokens are hashed in the future.

You should use the REST API to add users, e.g.,


#!/bin/sh
PHP_BIN=/usr/bin/php
PIWIK_PATH=/path/to/piwik/index.php
...
CMD="$PHP_BIN -q $PIWIK_PATH -- module=API&method=UsersManager.addUser&userLogin=$USERLOGIN&password=$PASSWORD&email=$EMAIL&token_auth=$SUPERUSER_TOKEN_AUTH"
$CMD

(PHP examples can be found in the misc folder.)

Hey, that was exactly what I was looking for, thanks for the info vipsoft !

thanks vipsoft…

is there a way to not return as XML?

Use the format= parameter, eg format=json.

Refer to the Dev Zone wiki for more info.