User ID session
  • il_dandiil_dandi February 2010

    Hi... I'm changing billers/customers detail for save also the user_id of the user that has created/updated the record.

    No problems for change save functions ... but how can I know and use the ID of the logged in user??

    I hope that you can help me!

    Thanks

  • tomarderntomardern February 2010

    What you could do, although this is a hassle, is to login to PHPMyAdmin and check the UserID in the users table.

    Thats the only way I can think of right now.

  • il_dandiil_dandi February 2010

    Yes I know this ;-)))

    But I'd like to know the user_id in code.... when a user log-in in the system.... can I know the user_id in users table?

    thanks

  • justinjustin February 2010

    try using $auth_session->id

    let us know how you go

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • il_dandiil_dandi February 2010

    Excuse me ... but where I have to insert this code??

    $auth_session->id;

    Thanks

  • justinjustin February 2010

    hey il_dandi

    assuming you are changing the save invoice code - just add $auth_session->id into the sql code where you want to add in the user id

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • il_dandiil_dandi February 2010

    ??

    > $auth_session->id

    But this isn't a SQL code!!

    suppose that I've saved customers created by a specified user (in a field user_id created in table)

    in query that show records I've to add a condition for select only records with user_id = XX

    but how Can I know the user logged-in ID??? I could save the user ID in a session var??

    Or??? Can you help me?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Categories