src/libraries/adapters/DatabaseMySql.php
/** Prepare user to store in the database
   */
Prepare user to store in the database
Prepare user to store in the database
private function prepareUser($params)
  {
    $ret = array('extra' => '', 'password' => '');
    $extra = array();
    if(isset($params) && is_array($params) && !empty($params))
    {
      foreach($params as $key => $val)
      {
        if($key !== 'password')
          $extra[$key] = $val;
      }
      $ret['extra'] = json_encode($extra);
      $ret['password'] = '';
      if(isset($params['password']))
        $ret['password'] = $params['password'];
    }
    return $ret;
  }
private function prepareUser ( $ params ) { $ ret = array ( 'extra' => '' , 'password' => '' ) ; $ extra = array ( ) ; if ( isset ( $ params ) && is_array ( $ params ) && ! empty ( $ params ) ) { foreach ( $ params as $ key => $ val ) { if ( $ key !== 'password' ) $ extra [ $ key ] = $ val ; } $ ret [ 'extra' ] = json_encode ( $ extra ) ; $ ret [ 'password' ] = '' ; if ( isset ( $ params [ 'password' ] ) ) $ ret [ 'password' ] = $ params [ 'password' ] ; } return $ ret ; }
Prepare user to store in the database
Prepare user to store in the database