src/Model/User.php
public function store($data, $isNew = false) {

        $encrypt = $this->encryptor;

        $authority = $this->config->get("setup.site.default-authority", NULL);

        $data['user_password'] = $encrypt->hash($data['user_password']);

        foreach ($data as $property => $value):
            $this->setPropertyValue($property, $value);
        endforeach;


        if (!$this->saveObject( $this->getPropertyValue("user_name_id"), "user", null, $isNew)) {
            //There is a problem!
            return false;
        }
        //Default Permission Group?
        if (!empty($authority)) {
            $query = "INSERT INTO ?objects_authority( authority_id, object_id ) SELECT {$this->database->quote((int) $authority)}, object_id FROM ?objects WHERE object_uri={$this->database->quote($this->getPropertyValue("user_name_id"))}";
            $this->database->exec($query);
        }


        return true;
    }
public function store($data, $isNew = false) {

        $encrypt = $this->encryptor;

        $authority = $this->config->get("setup.site.default-authority", NULL);

        $data['user_password'] = $encrypt->hash($data['user_password']);

        foreach ($data as $property => $value):
            $this->setPropertyValue($property, $value);
        endforeach;


        if (!$this->saveObject( $this->getPropertyValue("user_name_id"), "user", null, $isNew)) {
            //There is a problem!
            return false;
        }
        //Default Permission Group?
        if (!empty($authority)) {
            $query = "INSERT INTO ?objects_authority( authority_id, object_id ) SELECT {$this->database->quote((int) $authority)}, object_id FROM ?objects WHERE object_uri={$this->database->quote($this->getPropertyValue("user_name_id"))}";
            $this->database->exec($query);
        }


        return true;
    }
public function store ( $ data , $ isNew = false ) { $ encrypt = $ this -> encryptor ; $ authority = $ this -> config -> get ( "setup.site.default-authority" , NULL ) ; $ data [ 'user_password' ] = $ encrypt -> hash ( $ data [ 'user_password' ] ) ; foreach ( $ data as $ property => $ value ) : $ this -> setPropertyValue ( $ property , $ value ) ; endforeach ; if ( ! $ this -> saveObject ( $ this -> getPropertyValue ( "user_name_id" ) , "user" , null , $ isNew ) ) { //There is a problem! return false ; } //Default Permission Group? if ( ! empty ( $ authority ) ) { $ query = "INSERT INTO ?objects_authority( authority_id, object_id ) SELECT {$this->database->quote((int) $authority)}, object_id FROM ?objects WHERE object_uri={$this->database->quote($this->getPropertyValue(" user_name_id "))}" ; $ this -> database -> exec ( $ query ) ; } return true ; }
Store the user data in the database

@param array $data
@return boolean
@throws \Platform\Exception
Store the user data in the database