Adding required registration attributes

Permalink
This is my situation. I have two test users (one is superuser) set on my local install. I want to add several new user attributes that will be required upon registration. If the users are already registered, how will they know they need to update their profile?
I'm currently trying out a few pieces of code from this cheatsheet thing:http://www.weblicating.com/doku/doku.php?id=cheatsheet/...
I'm trying something like
<?php
  $u = new User();
  if($u->isLoggedIn()) {
    $ui = UserInfo::getByID($u->getUserID());
    if (!($ui->getAttribute('first_name'))) {
    echo 'You need to update your <a href="/profile/edit">user info</a>';
    }
  }
?>

I just pieced this together and haven't tested it yet, but I want it to only show up for the user who is logged in on their own profile, and it seems like a lot of work to do this for each attribute, especially if I need to add extra logic to not get a long list like this:
You need to update your First Name
You need to update your Last Name
You need to update your Address
You need to update your Favorite Movie
You need to update your Outdated Phone

Edit: I decided I want to encase all missing info in "You need to update your user info". I think I need to use the foreach loop used to display these attributes and test each to see if it has been set. So combine
foreach($attribs as $ak) {
         echo  $af->display($ak, $ak->isAttributeKeyRequiredOnRegister());

with
if ($ui->getAttribute('attribute_handle')) {}

I guess this is what I need help with.
Also when I make custom attributes required, it adds an asterisk by the label. The asterisk is absent on the default required fields like username, email, and password. I could add one individually to each label passed to the form helpers, or I could go into the helper source code and override it there, correct?

timtorres
 
pvernaglia replied on at Permalink Best Answer Reply
pvernaglia
If you add new required user attributes the next time you log in Concrete will display a page that asks the user to enter the new required information before logging them in. You don't need to add anything.