RE: [phplib] PHPLib & Phorum From: Matt Williams (matt <email protected>)
Date: 03/19/01

> What I could not realize (there was not enough time to do so): It is
> still necessary to add username and email-adress, when you post a new
> message to phorm. There must be a way, to read this data from the
> database and insert it automaticly.

I have an extra couple of columns in the the auth_user table which contain
name and email.
When the user is authenticated these are set as extra auth variables, so I
can call them as $auth->auth["email"] from within form.php

So change the lines towards the top of form.php
Change:

  if(isset($$name_cookie) && empty($author)){
    $author=$$name_cookie;
  }
  elseif(!isset($author)){
    $author="";
  }

  $email_cookie="phorum_email";
  if(isset($$email_cookie) && empty($email)){
    $email=$$email_cookie;
  }
  elseif(!isset($email)){
    $email="";
  }

To

    $author= $auth->auth["firstname"]." ".$auth->auth["lastname"];

    $email=$auth->auth["email"];

HTH

M@

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>