fixed a bug when used with phpCAS and exchanged mysql with postgres