× Requests and support related to jBackend.

Module User: Add information the results of json

  • chris0879
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #3985 by chris0879
you can add information the results with json?
I would select the value of the column password in the user_table, where id_user (Ok status login).
and add the result in json.
Thanks!
sorry for my English!

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #3986 by admin
Hi Chris,
you would llike to add the password information in the response when the user is logged in.

In general this is not a good idea (for security reasons) so I cannot add this as general available feature. But I am sure you have your good reasons for this, so you can customize the user plugin to provide you this information.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • chris0879
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #3987 by chris0879
Replied by chris0879 on topic Module User: Add information the results of json
Ciao Luigi,
grazie per la risposta.
Sostanzialmente quello che a me servirebbe è avere un ulteriore informazione dopo che l'utente ha effettuato il login.
Oltre a visualizzare: staus ok e id-number a me servirebbe tirar fuori dalla colonna password della tabella user di joomla il valore per l'utente loggato.
Vorrei sapere come ottenere questo anche con metodi grossolani.
grazie.

Please Log in or Create an account to join the conversation.

  • chris0879
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #3988 by chris0879
Replied by chris0879 on topic Module User: Add information the results of json
la colonna passwor della tabella user contiene una stringa simile a questa:
$2y$10$q2aqLCuL9zGodwQZ2XU/VuBrn4zMvt6Rq62AK7tuxFQ....
questa informazione verrà utilizzata da me come una ulteriore passwor per accedere a determinate sezioni.
ovviamente la stringa in questione deve riferirsi a l'utente loggato.
Grazie.

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #3989 by admin
Hi,
this requires a little customization to the user module. At the moment user data are provided by:
$user = JFactory::getUser();

Which doesn't include those kind of "protected" information. So you need to query the database to get the column for the user id. Something like this:

docs.joomla.org/Selecting_data_using_JDatabase

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • chris0879
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #3990 by chris0879
Replied by chris0879 on topic Module User: Add information the results of json
Salve,
che il valore della colonna dovo tirarlo fuori con una query tramite le api del database di joomla è chiaro.
Ma quello che non capisco e':
1)quale è il nome della variabile che contiene l'userid del cliente loggato?
2) se non esistesse come creare tale variabile che conterrebbe l'user_id del clinte loggato.?
3)la query dovrà essere effettuata dopo l'esito del login o a prescindere su ogni chiamata?
4) come integro il riusultato di tale query nel formato json?

Grazie!

Please Log in or Create an account to join the conversation.

Time to create page: 0.106 seconds